Skip to main content

generate

Function generate 

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

MLX-style top-level text generation helper.

Each call creates a fresh session with no prior context. For multi-turn conversations use LanguageModelSession directly.

ยงErrors

Returns every error documented by respond.