pub struct ModelsConfig {
pub providers: HashMap<String, ProviderModels>,
}Expand description
Models configuration using HashMap for flexible provider support This allows any provider to be added in models.yaml without code changes
Fields§
§providers: HashMap<String, ProviderModels>Implementations§
Source§impl ModelsConfig
impl ModelsConfig
Sourcepub fn load_embedded() -> Result<Self>
pub fn load_embedded() -> Result<Self>
Load models configuration from embedded YAML
Sourcepub fn load_with_fallback() -> Self
pub fn load_with_fallback() -> Self
Load models configuration with fallback to default
Sourcepub fn get_models_for_provider(&self, provider: &str) -> Vec<ModelInfo>
pub fn get_models_for_provider(&self, provider: &str) -> Vec<ModelInfo>
Get models for a specific provider
Sourcepub fn get_all_providers(&self) -> Vec<String>
pub fn get_all_providers(&self) -> Vec<String>
Get all provider names
Trait Implementations§
Source§impl Clone for ModelsConfig
impl Clone for ModelsConfig
Source§fn clone(&self) -> ModelsConfig
fn clone(&self) -> ModelsConfig
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 ModelsConfig
impl Debug for ModelsConfig
Source§impl Default for ModelsConfig
impl Default for ModelsConfig
Source§impl<'de> Deserialize<'de> for ModelsConfig
impl<'de> Deserialize<'de> for ModelsConfig
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
Auto Trait Implementations§
impl Freeze for ModelsConfig
impl RefUnwindSafe for ModelsConfig
impl Send for ModelsConfig
impl Sync for ModelsConfig
impl Unpin for ModelsConfig
impl UnwindSafe for ModelsConfig
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