pub struct ProvidersConfig {
pub providers: Vec<ProviderConfig>,
pub replay: Vec<ReplayProviderConfig>,
pub credentials: IndexMap<String, ProviderCredentialConfig>,
}Expand description
A providers file: either {providers: [...]} or a bare list.
Fields§
§providers: Vec<ProviderConfig>§replay: Vec<ReplayProviderConfig>kind: replay entries (feature replay), built after providers so they
can wrap one of them.
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).
Source§impl ProvidersConfig
impl ProvidersConfig
Sourcepub fn resolve_paths(&mut self, base: &Path)
pub fn resolve_paths(&mut self, base: &Path)
Resolve relative replay cassettes directories against base (usually
the directory of the providers file).