Skip to main content

Module responses_dispatch

Module responses_dispatch 

Source
Expand description

Function-call dispatcher for POST /api/v1/responses.

Mirrors Python’s [cognee.api.v1.responses.dispatch_function.dispatch_function]. When the OpenAI Responses API returns a function-call item in output, this module routes it to the in-process pipeline (search / cognify) and returns a JSON-serialisable result string the handler can fold back into the response body as a ToolCallOutput.

Structs§

ComponentHandlesDispatcher
Production dispatcher backed by the wired ComponentHandles.
ToolCall
A parsed function-call item extracted from the Responses API output array.
ToolDispatchResult
Outcome of dispatching one tool call.

Traits§

ToolDispatcher
Trait used to fan out tool calls. Implementations may run real cognee pipelines or canned stubs (the mocked dispatcher tests use a stub ToolDispatcher).

Functions§

default_tools
Default tools advertised to the upstream OpenAI Responses API.
dispatch_one
Dispatch a single tool call to the appropriate handler.
extract_tool_calls
Extract function-call entries from a Responses API output array.