class AI::Google::GoogleGenerativeAIEmbeddingModel

Overview

Google Generative AI embedding model.

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

Included Modules

Defined in:

ai/google/google_generative_ai_embedding_model.cr

Constant Summary

MAX_EMBEDDINGS_PER_CALL = 2048

Maximum embeddings per API call.

Constructors

Instance Method Summary

Instance methods inherited from module AI::Provider::EmbeddingModel::V3

do_embed(options : CallOptions) : Result do_embed, max_embeddings_per_call : Int32 | Nil max_embeddings_per_call, model_id : String model_id, provider : String provider, specification_version : String specification_version, supports_parallel_calls? : Bool supports_parallel_calls?

Constructor Detail

def self.new(model_id : String, config : EmbeddingConfig) #

[View source]

Instance Method Detail

Generates embeddings for the given values.


[View source]
def max_embeddings_per_call : Int32 | Nil #

Returns the maximum embeddings per call.


[View source]
def model_id : String #

The model ID.


[View source]
def provider : String #

Returns the provider name.


[View source]
def specification_version : String #

Returns the specification version.


[View source]
def supports_parallel_calls? : Bool #

Returns whether parallel calls are supported.


[View source]