Files
zesdex/crates/zesdex-backend/src/app/runtime/stream/mod.rs
T

16 lines
678 B
Rust
Raw Normal View History

//! SSE stream parser: converts SSE- or JSON-chunked LLM responses into
//! typed `StreamEvent` variants (tokens, reasoning, tool calls, usage, done).
/// JSON-repair utilities for malformed streaming fragments (truncated JSON,
/// missing brackets, escaped newlines inside strings).
pub mod json_repair;
/// Turn-level streaming state machine: manages buffering, SSE parsing,
/// tool-call accumulation, and per-chunk event dispatch.
pub mod turn;
/// Re-export from `zesdex-entities` for convenience:
/// - `SseParser` — low-level SSE line/event parser
/// - `StreamEvent` — typed event variants yielded by the parser
pub use zesdex_entities::{SseParser, StreamEvent};