pub enum ModelProvider {
OpenAI {},
OpenAICompatible {
base_url: String,
api_key: Option<String>,
project_id: Option<String>,
},
AzureOpenAI {
base_url: String,
api_key: Option<String>,
deployment: String,
api_version: String,
},
Anthropic {
base_url: Option<String>,
api_key: Option<String>,
},
Vllora {
base_url: String,
},
}Variants§
Implementations§
Source§impl ModelProvider
impl ModelProvider
pub fn openai_base_url() -> String
pub fn anthropic_base_url() -> Option<String>
pub fn vllora_url() -> String
pub fn azure_api_version() -> String
Sourcepub fn provider_id(&self) -> &'static str
pub fn provider_id(&self) -> &'static str
Returns the provider ID for secret lookup
Sourcepub fn required_secret_keys(&self) -> Vec<&'static str>
pub fn required_secret_keys(&self) -> Vec<&'static str>
Returns the required secret keys for this provider
Sourcepub fn all_provider_definitions() -> Vec<ProviderSecretDefinition>
pub fn all_provider_definitions() -> Vec<ProviderSecretDefinition>
Returns all provider secret definitions (static registry)
Sourcepub fn well_known_models() -> Vec<ProviderModels>
pub fn well_known_models() -> Vec<ProviderModels>
Returns the well-known models grouped by provider, for discovery purposes.
Sourcepub fn display_name(&self) -> &'static str
pub fn display_name(&self) -> &'static str
Get the human-readable name for a provider
Trait Implementations§
Source§impl Clone for ModelProvider
impl Clone for ModelProvider
Source§fn clone(&self) -> ModelProvider
fn clone(&self) -> ModelProvider
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelProvider
impl Debug for ModelProvider
Source§impl Default for ModelProvider
impl Default for ModelProvider
Source§impl<'de> Deserialize<'de> for ModelProvider
impl<'de> Deserialize<'de> for ModelProvider
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ModelProvider
impl JsonSchema for ModelProvider
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ModelProvider
impl RefUnwindSafe for ModelProvider
impl Send for ModelProvider
impl Sync for ModelProvider
impl Unpin for ModelProvider
impl UnsafeUnpin for ModelProvider
impl UnwindSafe for ModelProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more