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.crInstance Method Summary
-
#do_embed(options : CallOptions) : Result
Generates a list of embeddings for the given input text.
-
#max_embeddings_per_call : Int32 | Nil
Limit of how many embeddings can be generated in a single API call.
-
#model_id : String
Provider-specific model ID for logging purposes.
-
#provider : String
Name of the provider for logging purposes.
-
#specification_version : String
Returns the specification version.
-
#supports_parallel_calls? : Bool
True if the model can handle multiple embedding calls in parallel.
Instance Method Detail
Generates a list of embeddings for the given input text.
The embeddings in the result are in the same order as the input values.
Limit of how many embeddings can be generated in a single API call. Return nil for models that do not have a limit.
True if the model can handle multiple embedding calls in parallel.