MCPcopy Create free account
hub / github.com/CopilotKit/OpenGenerativeUI / POST

Function POST

apps/app/src/app/api/copilotkit/route.ts:43–56  ·  view source on GitHub ↗
(req: NextRequest)

Source from the content-addressed store, hash-verified

41});
42
43export const POST = async (req: NextRequest) => {
44 const ip = req.headers.get("x-forwarded-for")?.split(",")[0]?.trim() ?? "unknown";
45 if (isRateLimited(ip)) {
46 return new Response("Too many requests", { status: 429 });
47 }
48
49 const { handleRequest } = copilotRuntimeNextJSAppRouterEndpoint({
50 endpoint: "/api/copilotkit",
51 serviceAdapter: new ExperimentalEmptyAdapter(),
52 runtime: new CopilotRuntime(runtimeOptions),
53 });
54
55 return handleRequest(req);
56};

Callers

nothing calls this directly

Calls 1

isRateLimitedFunction · 0.85

Tested by

no test coverage detected