Expand description
SSE (Server-Sent Events) streaming for OpenAI-compatible chat completions.
Structs§
- Chat
Stream - A streaming chat completion response.
- Stream
Choice - Stream
Chunk - A single chunk in the SSE stream.
- Stream
Delta - Stream
Usage
Functions§
- finish_
chunk - The terminal chunk carrying the real finish_reason.
- token_
chunk - tool_
calls_ chunk - A content-delta chunk (built synchronously from the generation thread).
One delta carrying the aggregated tool calls, indexed for clients
that merge by
index. - usage_
chunk - The usage chunk (empty
choices, real counts) sent just before the finish chunk, exactly as OpenAI’sstream_options.include_usagedoes.