Skip to main content

ferrin_core/stream_text/
mod.rs

1//! Streaming text generation (`stream_text`).
2//!
3//! The step loop runs in a background task and emits [`StreamEvent`]s
4//! through a bounded channel; the consumer side applies the user transforms,
5//! accumulates step results and resolves the [`Completion`].
6//!
7//! Design: `docs/01-architecture/07-generation-loop-and-streaming.md` ยง3.
8
9mod builder;
10mod events;
11mod pipeline;
12mod result;
13pub mod transforms;
14
15pub use builder::ErrorDecision;
16pub use builder::OnErrorFn;
17pub(crate) use builder::StreamConfig;
18pub use builder::StreamText;
19pub use builder::stream_text;
20pub use events::StreamErrorInfo;
21pub use events::StreamEvent;
22pub use result::Completion;
23pub use result::EventStream;
24pub use result::StreamTextResult;
25pub use transforms::StreamTransform;
26pub use transforms::TransformContext;
27pub use transforms::smooth_stream;