pub trait ProviderConfig {
type PromptCacheSettings: Clone + Default + Send + Sync + 'static;
const PROVIDER_KEY: &'static str;
const DISPLAY_NAME: &'static str;
const DEFAULT_MODEL: &'static str;
const API_BASE_URL: &'static str;
const BASE_URL_ENV_VAR: Option<&'static str>;
// Provided method
fn create_provider(
api_key: String,
model: String,
base_url: String,
prompt_cache_enabled: bool,
prompt_cache_settings: Self::PromptCacheSettings,
timeouts: TimeoutsConfig,
) -> Box<dyn LLMProvider>
where Self::PromptCacheSettings: Send + Sync + 'static { ... }
}Expand description
Trait for provider-specific configuration and creation
Required Associated Constants§
const PROVIDER_KEY: &'static str
const DISPLAY_NAME: &'static str
const DEFAULT_MODEL: &'static str
const API_BASE_URL: &'static str
const BASE_URL_ENV_VAR: Option<&'static str>
Required Associated Types§
Provided Methods§
fn create_provider( api_key: String, model: String, base_url: String, prompt_cache_enabled: bool, prompt_cache_settings: Self::PromptCacheSettings, timeouts: TimeoutsConfig, ) -> Box<dyn LLMProvider>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".