pub struct LLMProvidersConfig {
pub providers: HashMap<String, LLMProvider>,
}Fields§
§providers: HashMap<String, LLMProvider>Implementations§
Source§impl LLMProvidersConfig
impl LLMProvidersConfig
pub fn new() -> Result<Self>
pub fn add_provider(&mut self, provider: LLMProvider) -> Result<()>
pub fn remove_provider(&mut self, name: &str) -> Result<()>
pub fn get_provider(&self, name: &str) -> Option<&LLMProvider>
pub fn get_default_provider(&self) -> Option<&LLMProvider>
pub fn list_providers(&self) -> Vec<&LLMProvider>
pub fn set_default_provider(&mut self, name: &str) -> Result<()>
Trait Implementations§
Source§impl Default for LLMProvidersConfig
impl Default for LLMProvidersConfig
Source§fn default() -> LLMProvidersConfig
fn default() -> LLMProvidersConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LLMProvidersConfig
impl<'de> Deserialize<'de> for LLMProvidersConfig
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 LLMProvidersConfig
impl RefUnwindSafe for LLMProvidersConfig
impl Send for LLMProvidersConfig
impl Sync for LLMProvidersConfig
impl Unpin for LLMProvidersConfig
impl UnwindSafe for LLMProvidersConfig
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