class

AI::Provider::TooManyEmbeddingValuesForCallError

Inherits AI::Provider::AISDKError < Exception < Reference < Object

Error thrown when too many values are provided for a single embedding call.

Different embedding models have different limits on how many values can be embedded in a single API call.

Constructors

new(*, provider : String, model_id : String, max_embeddings_per_call : Int32, values : Array(String))

Creates a new TooManyEmbeddingValuesForCallError.

Parameters:

  • provider: The name of the provider
  • model_id: The ID of the model
  • max_embeddings_per_call: The maximum allowed embeddings per call
  • values: The values that were attempted to be embedded
Source

Class methods

instance?(error) : Bool

Checks if the given value is an instance of TooManyEmbeddingValuesForCallError.

Source

Instance methods

max_embeddings_per_call

The maximum number of embeddings allowed per call.

Source
model_id

The ID of the model.

Source
provider

The name of the provider.

Source
values

The values that were attempted to be embedded.

Source