class
AI::Provider::TooManyEmbeddingValuesForCallError
- AI::Provider::TooManyEmbeddingValuesForCallError
- AI::Provider::AISDKError
- Exception
- Reference
- Object
Overview
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.
Defined in:
ai/provider/errors/too_many_embedding_values_for_call_error.crConstructors
-
.new(*, provider : String, model_id : String, max_embeddings_per_call : Int32, values : Array(String))
Creates a new TooManyEmbeddingValuesForCallError.
Class Method Summary
-
.instance?(error) : Bool
Checks if the given value is an instance of TooManyEmbeddingValuesForCallError.
Instance Method Summary
-
#max_embeddings_per_call : Int32
The maximum number of embeddings allowed per call.
-
#model_id : String
The ID of the model.
-
#provider : String
The name of the provider.
-
#values : Array(String)
The values that were attempted to be embedded.
Instance methods inherited from class AI::Provider::AISDKError
name : String
name,
to_s(io : IO) : Nil
to_s
Constructor methods inherited from class AI::Provider::AISDKError
new(*, name : String, message : String, cause : Exception | Nil = nil)
new
Class methods inherited from class AI::Provider::AISDKError
instance?(error) : Bool
instance?
Constructor Detail
def self.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
Class Method Detail
def self.instance?(error) : Bool
#
Checks if the given value is an instance of TooManyEmbeddingValuesForCallError.