Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProviderDescriptor.type
Members list
Value members
Concrete methods
Narrows a ProviderConfig to the subtype a provider's client needs.
Narrows a ProviderConfig to the subtype a provider's client needs.
Attributes
- Returns
-
Leftwith a org.llm4s.error.ConfigurationError naming both the provider and the config type it was handed, when the config belongs to a different provider.
Reads the apiKey that a requiresApiKey ProviderConfigSpec guarantees is present.
Reads the apiKey that a requiresApiKey ProviderConfigSpec guarantees is present.
Validation has already filled it in from the vendor's shared llm4s.credentials.<id>.apiKey when the section set none, so this fails only for a section that did not come through validation - one built in code.
Attributes
Reads a key the provider declares in ProviderConfigSpec.authExtras as required, or gives a default.
Reads a key the provider declares in ProviderConfigSpec.authExtras as required, or gives a default.
Validation has already enforced that, so this fails only for a section that did not come through validation - one built in code and handed to buildConfig directly.
Value parameters
- key
-
the declared key's name, e.g.
"tokenUrl".
Attributes
Reads a provider-specific key that the provider's ProviderConfigSpec.extras declares as required, or gives a default.
Reads a provider-specific key that the provider's ProviderConfigSpec.extras declares as required, or gives a default.
Validation has already enforced that, so this fails only for a section that did not come through validation - one built in code and handed to buildConfig directly.
Value parameters
- key
-
the declared key's name, e.g.
"region".
Attributes
Reads a required field out of a config section, failing with the message shape used across all providers.
Reads a required field out of a config section, failing with the message shape used across all providers.
Value parameters
- fieldName
-
human-readable field name, e.g.
"api key". - hint
-
where to set it, e.g.
"llm4s.providers.<name>.apiKey". - providerName
-
the user's instance name (
llm4s.providers.<name>).
Attributes
The section's baseUrl, falling back to the spec's defaultBaseUrl.
The section's baseUrl, falling back to the spec's defaultBaseUrl.
Fails only for a provider that has neither — Ollama, whose endpoint is wherever the user happens to run it.