ApiKeySource

org.llm4s.config.ApiKeySource

Where a named chat section's API key comes from.

A section that sets no apiKey of its own uses its vendor's shared key, llm4s.credentials.<providerId>.apiKey. That is the convenient default - set OPENAI_API_KEY and every OpenAI section works - and also the way a section meant for a second account, missing its key, silently bills the first. Llm4sConfig.apiKeySources reports which sections do which, so a policy can insist on explicit keys in production.

Attributes

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

Members list

Type members

Enum entries

final case class Credentials(path: String)

The section sets no apiKey, so it uses the vendor's shared key - whether or not that key is set in the environment the check runs in.

The section sets no apiKey, so it uses the vendor's shared key - whether or not that key is set in the environment the check runs in.

Value parameters

path

the shared key's path, e.g. llm4s.credentials.openai.apiKey

Attributes

final case class Section(path: String)

The section sets its own apiKey.

The section sets its own apiKey.

Value parameters

path

where, e.g. llm4s.providers.openai-main.apiKey

Attributes