MCPcopy
hub / github.com/CopilotKit/CopilotKit / make_handler

Function make_handler

sdk-python/copilotkit/integrations/fastapi.py:51–57  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

49 return loop.run_until_complete(handler(request, sdk))
50
51 async def make_handler(request: Request):
52 if use_thread_pool:
53 executor = ThreadPoolExecutor(max_workers=max_workers)
54 loop = asyncio.get_event_loop()
55 future = loop.run_in_executor(executor, run_handler_in_thread, request, sdk)
56 return await future
57 return await handler(request, sdk)
58
59 # Ensure the prefix starts with a slash and remove trailing slashes
60 normalized_prefix = "/" + prefix.strip("/")

Callers

nothing calls this directly

Calls 1

handlerFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…