@copilotkit/runtime
Version:
<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />
27 lines (25 loc) • 913 B
text/typescript
import { CopilotRuntimeHandlerOptions } from "../core/fetch-handler.cjs";
import { NodeFetchHandler } from "./node-fetch-handler.cjs";
//#region src/v2/runtime/endpoints/node.d.ts
/**
* Convenience wrapper for creating a Node.js HTTP request listener
* from CopilotKit runtime handler options.
*
* @example
* ```typescript
* import { createServer } from "node:http";
* import { CopilotRuntime } from "@copilotkit/runtime/v2";
* import { createCopilotNodeListener } from "@copilotkit/runtime/v2/node";
*
* const listener = createCopilotNodeListener({
* runtime: new CopilotRuntime({ agents: { ... } }),
* basePath: "/api/copilotkit",
* cors: true,
* });
* createServer(listener).listen(3000);
* ```
*/
declare function createCopilotNodeListener(options: CopilotRuntimeHandlerOptions): NodeFetchHandler;
//#endregion
export { createCopilotNodeListener };
//# sourceMappingURL=node.d.cts.map