Skip to main content

stream_generate

Function stream_generate 

Source
pub fn stream_generate<P>(prompt: P) -> Result<ResponseStream, Error>
where P: TryInto<Prompt>, P::Error: Into<Error>,
Expand description

MLX-style top-level streaming helper.

ยงErrors

Returns Error::NullByte for invalid prompt text, Error::Unavailable when Apple Intelligence is unavailable, or Error::Generation if stream startup fails.