Configuration required to connect to an embedding provider endpoint.
Value parameters
apiKey
authentication key for the provider; redacted in toString
apiKeyProvider
supplies the key per request in place of apiKey, so a rotated key is used without rebuilding the provider (#2478): a block's apiKeyFile (or the vendor's shared llm4s.credentials.<id>.apiKeyFile) sets org.llm4s.llmconnect.auth.ApiKeyProvider.file, and code sets any implementation with withApiKeyProvider. apiKey then holds the key read at load. An embedding provider reads the key with currentApiKey. Build one with EmbeddingProviderConfig.apply and change it with the with* setters; the constructor and copy are private, so a new field never breaks callers.
baseUrl
base URL of the embedding service (e.g. https://api.openai.com/v1)
how long an embedding request may take: the section's timeouts.request. Absent means the provider's own default (two minutes). timeouts.stream has no meaning for an embedding call.
The key to send with the next request: apiKeyProvider's current key when one is set, otherwise apiKey. A key file that has become unreadable or empty is a Left naming its path, and a provider that throws is an AuthenticationError naming the exception's class, as it is for a chat client.
The key to send with the next request: apiKeyProvider's current key when one is set, otherwise apiKey. A key file that has become unreadable or empty is a Left naming its path, and a provider that throws is an AuthenticationError naming the exception's class, as it is for a chat client.