Skip to main content

Factory

Type Alias Factory 

Source
pub type Factory = Arc<dyn Fn(String) -> BoxFuture<'static, Result<Arc<dyn Llm>, ModelError>> + Send + Sync>;
Expand description

Constructs an Llm for the given model name.

The name is the same string that was matched against the registered pattern, so a single factory can serve a family of models (for example, all gemini-* names).

Aliased Typeยง

pub struct Factory { /* private fields */ }