Build one with RerankProviderConfig.apply and change it with the with* setters; the constructor and copy are private, so a new field never breaks callers.
Value parameters
apiKey
API key for authentication
apiKeyProvider
supplies the key per request in place of apiKey, so a rotated key is used without rebuilding the reranker (#2478): llm4s.rerank.cohere.apiKeyFile, or Cohere's shared llm4s.credentials.cohere.apiKeyFile, sets org.llm4s.llmconnect.auth.ApiKeyProvider.file. apiKey then holds the key read at load.
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.