Skip to main content

ModelStream

Type Alias ModelStream 

Source
pub type ModelStream = BoxStream<'static, Result<ModelDelta, LmError>>;
Expand description

The output of a LanguageModel::generate call: a boxed stream of ModelDelta results, delivered delta by delta.

BoxStream on native and LocalBoxStream on wasm32, behind one cfg’d alias — the same Send-where-it-exists split as MaybeSend: the pipeline is one logical task that stays Send for a work-stealing executor natively, while on wasm32 (one thread, !Send JS handles) that bound must vanish.

Aliased Type§

pub struct ModelStream { /* private fields */ }