stream-rs 0.1.0

Zero-dependency, spec-compliant streaming toolkit for LLM responses (SSE, incremental JSON, OpenAI/Anthropic delta accumulators).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Provider-specific delta accumulators.
//!
//! LLM streaming APIs send a final message as a series of incremental "delta"
//! events. These accumulators fold those deltas back into the complete value,
//! tracking just the text content (and, where applicable, tool-call arguments)
//! that callers usually care about.
//!
//! The accumulators are deliberately decoupled from any JSON library: they
//! accept already-parsed primitive pieces, so you can wire them up to whatever
//! deserializer you use. See each submodule for details.

pub mod anthropic;
pub mod gemini;
pub mod openai;