module

AI::Provider::EmbeddingModel::V3

Embedding Model V3 interface.

Implement this module to create an embedding model provider. This interface is specific to text embeddings.

Instance methods

do_embed(options : CallOptions) : Result

Generates a list of embeddings for the given input text.

The embeddings in the result are in the same order as the input values.

Source
max_embeddings_per_call

Limit of how many embeddings can be generated in a single API call. Return nil for models that do not have a limit.

Source
model_id

Provider-specific model ID for logging purposes.

Source
provider

Name of the provider for logging purposes.

Source
specification_version

Returns the specification version.

Source
supports_parallel_calls?

True if the model can handle multiple embedding calls in parallel.

Source