Skip to main content

build_single_llm_provider

Function build_single_llm_provider 

Source
pub async fn build_single_llm_provider(
    provider_kind: &ProviderKind,
    config: &LoadedConfig,
    http_config: HttpStackConfig,
) -> Result<Arc<dyn LlmProvider>>
Expand description

Instantiate a provider based on ProviderKind.

When downstream developers want to swap in their own OpenAI implementation, call this function independently to construct the default provider, then push a custom entry into ProviderRegistry::new.