ModelSelector

org.llm4s.llmconnect.utils.ModelSelector
object ModelSelector

Selects an embedding model configuration based on input modality.

Text modality selection is intentionally disallowed here; callers should load text embedding models through their typed config layer. Image, audio, and video modalities are resolved from the supplied LocalEmbeddingModels config.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Select a local embedding model by modality.

Select a local embedding model by modality.

Text modality returns an error since text model selection is configuration-driven. Image, audio, and video modalities resolve against the supplied local-model configuration and look up dimensions from the ModelDimensionRegistry.

Value parameters

localModels

local model configuration containing model names per modality

modality

the input modality to select a model for

Attributes

Returns

the resolved EmbeddingModelConfig or an error