What JevClient needs to call TypeSafe's API.
Load it from configuration with org.llm4s.config.JevConfigLoader, which reads the llm4s.jev block and the API key from TYPESAFE_API_KEY, or build one in code:
val config = JevConfig(apiKey = key).withModel("jev-1.13.0")
A config is checked by JevConfig#validate, which JevClient runs when it is built.
Value parameters
- apiKey
-
the API key; never printed by
toStringor logged, and masked in an error wherever the server echoed it verbatim, JSON-escaped or URL-encoded (a partial or otherwise transformed echo of the key is not recognised) - baseUrl
-
the API root, without a path. It must be
https: the key is sent as a bearer token, so a plainhttpURL is accepted only for a loopback host (localhost,127.0.0.0/8,::1), which is how a test points the client at a local server. - headers
-
extra HTTP headers for every request (a request can add its own); the client sets the credentials, content type and
Acceptheader itself and refuses to have them replaced - model
-
the model a request uses unless it names one:
jev-latest, or a versioned id such asjev-1.13.0to pin the answers - retry
-
how a transient failure is retried
- timeout
-
how long each HTTP attempt may take. The API documents no figure: 30 s is this client's choice, matching the retry budget of TypeSafe's SDKs. An attempt never waits past what is left of the retry budget, so the budget bounds the whole call.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any