Expand description
SSE streaming support for LLM provider responses.
Provides types and parsing for Server-Sent Events (SSE) used by streaming LLM APIs (OpenAI Responses API, Anthropic, etc.).
Structs§
- FnStream
Callback - A closure-based StreamCallback.
Enums§
- Stream
Event - Events emitted during a streaming LLM response.
Traits§
- Stream
Callback - Callback for stream events. Implementations should be cheap/non-blocking.
Functions§
- parse_
sse_ block - Parse an SSE event block (event type + data) from raw lines.
- parse_
sse_ data - Parse a single SSE data line (after “data: “ prefix) as JSON.