Skip to main content

Module anthropic_streaming

Module anthropic_streaming 

Source
Expand description

SSE decoder state machine for Anthropic Messages API streaming.

Maps Anthropic streaming events to NormalizedEvent using a stateful decoder that tracks content block types and accumulates tool call JSON.

Structs§

StreamState
Tracks state across a streaming Anthropic response.

Functions§

parse_sse_line
Parse a raw SSE line pair into a StreamEvent.