@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;" />
1 lines • 1.39 kB
Source Map (JSON)
{"version":3,"file":"empty-adapter.mjs","names":[],"sources":["../../../src/service-adapters/empty/empty-adapter.ts"],"sourcesContent":["/**\n * CopilotKit Empty Adapter\n *\n * This adapter is meant to preserve adherence to runtime requirements, while doing nothing\n * Ideal if you don't want to connect an LLM the to the runtime, and only use your LangGraph agent.\n * Be aware that Copilot Suggestions will not work if you use this adapter\n *\n * ## Example\n *\n * ```ts\n * import { CopilotRuntime, EmptyAdapter } from \"@copilotkit/runtime\";\n *\n * const copilotKit = new CopilotRuntime();\n *\n * return new EmptyAdapter();\n * ```\n */\nimport {\n CopilotServiceAdapter,\n CopilotRuntimeChatCompletionRequest,\n CopilotRuntimeChatCompletionResponse,\n} from \"../service-adapter\";\nimport { randomUUID } from \"@copilotkit/shared\";\n\nexport class EmptyAdapter implements CopilotServiceAdapter {\n async process(\n request: CopilotRuntimeChatCompletionRequest,\n ): Promise<CopilotRuntimeChatCompletionResponse> {\n return {\n threadId: request.threadId || randomUUID(),\n };\n }\n public get name() {\n return \"EmptyAdapter\";\n }\n}\n\nexport const ExperimentalEmptyAdapter = EmptyAdapter;\n"],"mappings":";;;;AAwBA,IAAa,eAAb,MAA2D;CACzD,MAAM,QACJ,SAC+C;AAC/C,SAAO,EACL,UAAU,QAAQ,YAAY,YAAY,EAC3C;;CAEH,IAAW,OAAO;AAChB,SAAO;;;AAIX,MAAa,2BAA2B"}