class

AI::Google::GoogleGenerativeAIEmbeddingModel

Inherits AI::Provider::EmbeddingModel::V3 < Reference < Object

Google Generative AI embedding model.

Implements the EmbeddingModelV3 interface for generating text embeddings using Google's Generative AI API.

Constants

MAX_EMBEDDINGS_PER_CALL = 2048

Maximum embeddings per API call.

Constructors

new(model_id : String, config : EmbeddingConfig)
Source

Instance methods

do_embed(options : Provider::EmbeddingModel::CallOptions) : Provider::EmbeddingModel::Result

Generates embeddings for the given values.

Source
max_embeddings_per_call

Returns the maximum embeddings per call.

Source
model_id

The model ID.

Source
provider

Returns the provider name.

Source
specification_version

Returns the specification version.

Source
supports_parallel_calls?

Returns whether parallel calls are supported.

Source