pub struct ProvidersConfig {
pub providers: Vec<ProviderConfig>,
pub credentials: IndexMap<String, ProviderCredentialConfig>,
}Expand description
A providers file: either {providers: [...]} or a bare list.
Fields§
§providers: Vec<ProviderConfig>§credentials: IndexMap<String, ProviderCredentialConfig>Providers authenticated by a dynamic credential source (token broker, env var
read per request, or host-supplied), keyed by provider name. Entries replace
same-named providers. See docs/credentials.md.
Implementations§
Source§impl ProvidersConfig
impl ProvidersConfig
Sourcepub fn load(
&self,
vars: &[(String, String)],
) -> Result<LoadedProviders, LlmError>
pub fn load( &self, vars: &[(String, String)], ) -> Result<LoadedProviders, LlmError>
Build the chat models (and the System One client of a typesafe
credentials entry), reading secrets and ${VAR} references from vars.
Providers files have no host app, so credentials entries cannot use
source: external or app_auth: external, and a credentials entry may not
share its name with a providers entry (it would silently replace its
aliases, model map and defaults).
Trait Implementations§
Source§impl Clone for ProvidersConfig
impl Clone for ProvidersConfig
Source§impl Debug for ProvidersConfig
impl Debug for ProvidersConfig
Source§impl Default for ProvidersConfig
impl Default for ProvidersConfig
Source§impl<'de> Deserialize<'de> for ProvidersConfig
impl<'de> Deserialize<'de> for ProvidersConfig
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 Forget for ProvidersConfig
impl Freeze for ProvidersConfig
impl Move for ProvidersConfig
impl RefUnwindSafe for ProvidersConfig
impl Send for ProvidersConfig
impl Sync for ProvidersConfig
impl Unpin for ProvidersConfig
impl UnsafeUnpin for ProvidersConfig
impl UnwindSafe for ProvidersConfig
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