EmbeddingConfigSpec

org.llm4s.llmconnect.spi.EmbeddingConfigSpec
See theEmbeddingConfigSpec companion class

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def fieldPath(id: ProviderId, field: String): String

The config path of one field in a provider's section, quoted as sectionPath is.

The config path of one field in a provider's section, quoted as sectionPath is.

Attributes

Resolves the API key: the section first, then the spec's stand-in.

Resolves the API key: the section first, then the spec's stand-in.

The section's apiKey already accounts for EmbeddingConfigSpec.apiKeyPath: the loader resolves that path and fills it in before calling the descriptor, so no configuration is read from here.

A provider whose spec neither requires a key nor supplies a default gets the empty string, which is what a local provider that ignores the field expects.

Attributes

Resolves the base URL: the section first, then the spec's default.

Resolves the base URL: the section first, then the spec's default.

Attributes

def resolveModel(id: ProviderId, section: EmbeddingProviderSection, modelOverride: Option[String], spec: EmbeddingConfigSpec): Result[String]

Resolves the model: the EMBEDDING_MODEL=<id>/<model> override first, then the section, then the spec's default.

Resolves the model: the EMBEDDING_MODEL=<id>/<model> override first, then the section, then the spec's default.

Value parameters

modelOverride

the <model> half of a unified EMBEDDING_MODEL, when one was given.

Attributes

def sectionPath(id: ProviderId): String

The config path of a provider's section, e.g. llm4s.embeddings.openai.

The config path of a provider's section, e.g. llm4s.embeddings.openai.

Built by joining literal segments rather than by interpolation, because ProviderId canonicalises but does not restrict: ProviderId("acme.embeddings") is a legal id, and interpolating it would name the nested path llm4s.embeddings.acme.embeddings rather than the key the user quoted. ConfigUtil.joinPath quotes each segment that needs it, so the path this returns is also the path to write in HOCON.

Attributes