module AI::Provider::EmbeddingModel::V3

Overview

Embedding Model V3 interface.

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

Direct including types

Defined in:

ai/provider/embedding_model/embedding_model.cr

Instance Method Summary

Instance Method Detail

abstract def 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.


[View source]
abstract def max_embeddings_per_call : Int32 | Nil #

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


[View source]
abstract def model_id : String #

Provider-specific model ID for logging purposes.


[View source]
abstract def provider : String #

Name of the provider for logging purposes.


[View source]
def specification_version : String #

Returns the specification version.


[View source]
abstract def supports_parallel_calls? : Bool #

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


[View source]