Skip to main content

create_driver

Function create_driver 

Source
pub fn create_driver(
    api_style: ApiStyle,
    provider_id: &str,
    capabilities: Vec<Capability>,
) -> Box<dyn ProviderDriver>
Expand description

Factory function to create the appropriate driver from an API style.

The Custom style falls back to OpenAI-compatible, which covers most providers that follow the OpenAI chat completions format (DeepSeek, Moonshot, Zhipu, etc.).