2026-07-12 11:28:39 +07:00
|
|
|
//! SSE stream parser: converts SSE- or JSON-chunked LLM responses into
|
|
|
|
|
//! typed `StreamEvent` variants (tokens, reasoning, tool calls, usage, done).
|
2026-07-19 17:05:27 +07:00
|
|
|
|
|
|
|
|
/// JSON-repair utilities for malformed streaming fragments (truncated JSON,
|
|
|
|
|
/// missing brackets, escaped newlines inside strings).
|
2026-07-17 09:03:37 +07:00
|
|
|
pub mod json_repair;
|
2026-07-19 17:05:27 +07:00
|
|
|
|
|
|
|
|
/// Turn-level streaming state machine: manages buffering, SSE parsing,
|
|
|
|
|
/// tool-call accumulation, and per-chunk event dispatch.
|
2026-07-11 23:45:13 +07:00
|
|
|
pub mod turn;
|
|
|
|
|
|
2026-07-19 17:05:27 +07:00
|
|
|
/// Re-export from `zesdex-entities` for convenience:
|
|
|
|
|
/// - `SseParser` — low-level SSE line/event parser
|
|
|
|
|
/// - `StreamEvent` — typed event variants yielded by the parser
|
2026-07-17 06:44:31 +07:00
|
|
|
pub use zesdex_entities::{SseParser, StreamEvent};
|