RerankProviderConfig

org.llm4s.reranker.RerankProviderConfig
See theRerankProviderConfig companion object
final case class RerankProviderConfig

Configuration for reranker providers.

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.

baseUrl

API endpoint

model

Model name (e.g., "rerank-english-v3.0")

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

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.

Attributes

Sets the API key.

Sets the API key.

Attributes

Supplies the key per request from provider rather than sending apiKey.

Supplies the key per request from provider rather than sending apiKey.

Attributes

Supplies the key per request from provider, or sends apiKey when it is None.

Supplies the key per request from provider, or sends apiKey when it is None.

Attributes

def withBaseUrl(baseUrl: String): RerankProviderConfig

Sets the API endpoint.

Sets the API endpoint.

Attributes

def withModel(model: String): RerankProviderConfig

Sets the model.

Sets the model.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product