handle_create(
self,
request: CreateResponse,
context: ResponseContext,
cancellation_signal: asyncio.Event
) -> AsyncIterator| Name | Type | Description |
|---|---|---|
request* | CreateResponse | |
context* | ResponseContext | |
cancellation_signal* | asyncio.Event |
Drive the graph and yield Responses API events.
Override this when wholesale customisation is needed. By default the method:
1. emits ``response.created`` / ``response.in_progress`` and durably
checkpoints handler admission,
2. resolves the LangGraph thread and checks for pending
``interrupt()`` pauses on the checkpointed
thread and:
mcp_approval_response with
approve=false for a pending interrupt, emits
response.failed(code="interrupt_rejected", ā¦) and
stops;function_call_output (rich) or
mcp_approval_response{approve:true} (echo the
interrupt value back),CompiledStateGraph.astream or
:meth:CompiledStateGraph.ainvoke depending on
request.stream,function_call +
mcp_approval_request items both keyed by the LangGraph
interrupt id, andresponse.completed (or response.failed /
response.cancelled on error).The parsed create-response request.
The response context for the request.
Set when the request is cancelled.