JevConfigLoader

org.llm4s.config.JevConfigLoader

Loads the llm4s.jev block into a org.llm4s.jev.JevConfig.

It lives in org.llm4s.config, the one package that reads configuration; org.llm4s.jev.JevClient takes the typed config it returns and reads nothing itself.

llm4s-jev's reference.conf binds TYPESAFE_BASE_URL to baseUrl and TYPESAFE_DEFAULT_MODEL to model (the variables TypeSafe's own SDKs read), and TYPESAFE_API_KEY to llm4s.credentials.typesafe.apiKey. The key is llm4s.jev.apiKey when that is set and the shared llm4s.credentials.typesafe.apiKey otherwise, so one variable serves every client of the vendor. Everything but the key has a default.

llm4s.jev {
 model   = "jev-1.13.0"        # pin the answers; the default is the alias jev-latest
 timeout = 20 seconds
 retry { maxRetries = 3 }
}
for
 config <- JevConfigLoader.default()
 client <- JevClient(config)
yield client

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

load against the current environment: system properties, application.conf and every reference.conf.

load against the current environment: system properties, application.conf and every reference.conf.

Attributes

def load(source: ConfigSource): Result[JevConfig]

Reads llm4s.jev from source and checks the result.

Reads llm4s.jev from source and checks the result.

Attributes

Returns

the config, or a org.llm4s.error.ConfigurationError for an unreadable block, a key set in neither place, or a setting org.llm4s.jev.JevConfig#validate refuses

Concrete fields

val TYPESAFE_API_KEY: String

The variable this module's reference.conf binds to llm4s.credentials.typesafe.apiKey, named in the missing-key error.

The variable this module's reference.conf binds to llm4s.credentials.typesafe.apiKey, named in the missing-key error.

Attributes