Verdict4sEnv

com.softinio.verdict4s.Verdict4sEnv
object Verdict4sEnv

Reading configuration from the environment. JVM only.

A separate object rather than methods on Verdict4s, and not by preference: a Scala object cannot be split across src/ and src-jvm/, so adding these there would force jev and openAI to be duplicated into both platform directories — exactly the drift that keeping one signature on both platforms is meant to prevent.

Scala.js has no environment to read, so this simply does not exist there. The JVM artifact having a slightly larger surface than the JS one is normal and does not affect Verdict4s.

Variable names match each vendor's official SDKs, so a project can share them:

Variable Meaning
VERDICT4S_VENDOR jev (the default) or openai, for default
TYPESAFE_API_KEY Jev's API key
TYPESAFE_BASE_URL Jev's address
TYPESAFE_DEFAULT_MODEL Jev's default model
OPENAI_API_KEY OpenAI's API key
OPENAI_BASE_URL OpenAI's address, including /v1

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apiKey[F[_] : Sync]: F[ApiKey]

Jev's key from TYPESAFE_API_KEY, failing if it is absent or blank.

Jev's key from TYPESAFE_API_KEY, failing if it is absent or blank.

Attributes

def baseUri[F[_] : Sync]: F[Uri]

Jev's base URI from TYPESAFE_BASE_URL, or the service's own address.

Jev's base URI from TYPESAFE_BASE_URL, or the service's own address.

Attributes

def default[F[_] : Async]: Resource[F, Verdict4sClient[F]]

A client for the vendor named by VERDICT4S_VENDOR, configured entirely from the environment. Jev when the variable is unset.

A client for the vendor named by VERDICT4S_VENDOR, configured entirely from the environment. Jev when the variable is unset.

Attributes

def jev[F[_] : Async]: Resource[F, JevClient[F]]

A Jev client configured entirely from the environment.

A Jev client configured entirely from the environment.

Attributes

def model[F[_] : Sync]: F[Model]

Jev's default model from TYPESAFE_DEFAULT_MODEL, or jev-latest.

Jev's default model from TYPESAFE_DEFAULT_MODEL, or jev-latest.

Attributes

def openAI[F[_] : Async]: Resource[F, OpenAIClient[F]]

An OpenAI Decisions client configured entirely from the environment.

An OpenAI Decisions client configured entirely from the environment.

Attributes

def openAIApiKey[F[_] : Sync]: F[ApiKey]

OpenAI's key from OPENAI_API_KEY, failing if it is absent or blank.

OpenAI's key from OPENAI_API_KEY, failing if it is absent or blank.

Attributes

def openAIBaseUri[F[_] : Sync]: F[Uri]

OpenAI's base URI from OPENAI_BASE_URL, or the service's own address. Includes /v1, as it does for OpenAI's SDKs.

OpenAI's base URI from OPENAI_BASE_URL, or the service's own address. Includes /v1, as it does for OpenAI's SDKs.

Attributes

def vendor[F[_] : Sync]: F[Vendor]

The vendor named by VERDICT4S_VENDOR: jev (the default when it is unset) or openai, in any case.

The vendor named by VERDICT4S_VENDOR: jev (the default when it is unset) or openai, in any case.

Attributes

Concrete fields

Environment variable choosing the vendor for default.

Environment variable choosing the vendor for default.

Attributes