Skip to main content

sse_response_with_tool_calls

Function sse_response_with_tool_calls 

Source
pub fn sse_response_with_tool_calls(stream: ChatStream, model: &str) -> Response
Expand description

Convert a ChatStream into an SSE response that streams prose as content deltas and completed <tool_call> blocks as tool_calls deltas.

Unlike sse_single_response, which buffers the whole completion, this forwards tokens incrementally. Used when a tools-bearing request targets a provider that supports streaming.