Files
2026-07-13 12:58:18 +08:00

35 lines
909 B
TypeScript

import {
createCopilotEndpoint,
createCopilotEndpointSingleRoute,
} from "@copilotkit/runtime/v2";
import {
createCatalogOnlyRuntime,
createDefaultRuntime,
createMcpRuntime,
} from "./runtime";
const defaultRuntime = createDefaultRuntime();
const singleRuntime = createDefaultRuntime();
const mcpRuntime = createMcpRuntime();
const catalogOnlyRuntime = createCatalogOnlyRuntime();
export const copilotEndpoint = createCopilotEndpoint({
runtime: defaultRuntime,
basePath: "/api/copilotkit",
});
export const copilotSingleEndpoint = createCopilotEndpointSingleRoute({
runtime: singleRuntime,
basePath: "/api/copilotkit-single",
});
export const copilotMcpEndpoint = createCopilotEndpoint({
runtime: mcpRuntime,
basePath: "/api/copilotkit-mcp",
});
export const copilotCatalogEndpoint = createCopilotEndpoint({
runtime: catalogOnlyRuntime,
basePath: "/api/copilotkit-catalog",
});