Skip to main content

Module streaming

Module streaming 

Source

Functionsยง

sse_response
Convert a ChatStream into an SSE response in OpenAI streaming format
sse_response_strip_fences
Convert a ChatStream into an SSE response, stripping markdown code fences
sse_response_with_tool_calls
Convert a ChatStream into an SSE response that streams prose as content deltas and completed <tool_call> blocks as tool_calls deltas.
sse_single_response
Emit a complete non-streaming response as an SSE event sequence