class
AI::Provider::NoSuchModelError
- AI::Provider::NoSuchModelError
- AI::Provider::AISDKError
- Exception
- Reference
- Object
Overview
Error thrown when a requested model does not exist.
This error is raised when attempting to access a model that is not available from the provider.
Defined in:
ai/provider/errors/no_such_model_error.crConstructors
-
.new(*, model_id : String, model_type : ModelType, error_name : String = DEFAULT_ERROR_NAME, message : String | Nil = nil)
Creates a new NoSuchModelError.
Class Method Summary
-
.instance?(error) : Bool
Checks if the given value is an instance of NoSuchModelError.
Instance Method Summary
-
#model_id : String
The ID of the model that was not found.
-
#model_type : ModelType
The type of model that was requested.
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(*, model_id : String, model_type : ModelType, error_name : String = DEFAULT_ERROR_NAME, message : String | Nil = nil)
#
Creates a new NoSuchModelError.
Parameters:
- model_id: The ID of the model that was not found
- model_type: The type of model (language, embedding, image, etc.)
- error_name: Optional custom error name
- message: Optional custom message