NamedProviderConfig

org.llm4s.config.ProvidersConfigModel.NamedProviderConfig
final case class NamedProviderConfig(provider: ProviderKind, model: ModelName, baseUrl: Option[BaseUrl], apiKey: Option[ApiKey], organization: Option[String], endpoint: Option[String], apiVersion: Option[String])

Validated and normalised configuration for a single named provider.

Value parameters

apiKey

provider-dependent credential: an API key for most providers, or a path to a service-account credentials file for VertexAI

apiVersion

optional API version string (Azure-specific)

baseUrl

optional base URL override

endpoint

provider-dependent: the endpoint URL for Azure, or the GCP project ID for VertexAI

model

the model name to use

organization

provider-dependent: the organisation identifier for OpenAI, or the GCP region/location for VertexAI

provider

the resolved ProviderKind

Attributes

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

Members list

Value members

Concrete methods

def baseUrlOrDefault(default: => String): BaseUrl

Returns the configured base URL, falling back to default when absent.

Returns the configured base URL, falling back to default when absent.

Value parameters

default

by-name fallback string used to construct a BaseUrl

Attributes

Returns

the configured or default BaseUrl

Returns the configured API key or fails with a ConfigurationError if absent.

Returns the configured API key or fails with a ConfigurationError if absent.

Attributes

Returns

Right(ApiKey) when present, or Left with an error

Returns the configured base URL or fails with a ConfigurationError if absent.

Returns the configured base URL or fails with a ConfigurationError if absent.

Attributes

Returns

Right(BaseUrl) when present, or Left with an error

Returns this config if its provider matches expected, otherwise a ConfigurationError.

Returns this config if its provider matches expected, otherwise a ConfigurationError.

Value parameters

expected

the ProviderKind that is required

Attributes

Returns

Right(this) when the provider matches, or Left with a descriptive error

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product