Skip to main content

FamilyProviderFactory

Trait FamilyProviderFactory 

Source
pub trait FamilyProviderFactory {
    // Required method
    fn create_provider(
        &self,
        alias: &str,
        key: Option<&str>,
        api_url: Option<&str>,
        opts: &ModelProviderRuntimeOptions,
    ) -> Result<Box<dyn ModelProvider>, Error>;
}
Expand description

Per-family construction trait. Implemented (directly or via the CompatFamilySpec blanket) by every typed <Family>ModelProviderConfig.

&self IS the typed alias config — implementations read their own per-alias fields directly instead of through a flat options dumping ground. api_url is the resolved endpoint URL (operator override or pre-resolved family default); key is the resolved API credential.

Required Methods§

Source

fn create_provider( &self, alias: &str, key: Option<&str>, api_url: Option<&str>, opts: &ModelProviderRuntimeOptions, ) -> Result<Box<dyn ModelProvider>, Error>

Implementors§