struct
AI::OpenAI::OpenAIErrorInfo
- AI::OpenAI::OpenAIErrorInfo
- Struct
- Value
- Object
Overview
OpenAI error information structure.
The additional information below is handled loosely to support OpenAI-compatible providers that have slightly different error responses.
Included Modules
- JSON::Serializable
Defined in:
ai/openai/openai_error.crConstructors
- .new(pull : JSON::PullParser)
- .new(message : String, type : String | Nil = nil, param : JSON::Any | Nil = nil, code : String | Int64 | Nil = nil)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#code : String | Int64 | Nil
The error code (optional, can be string or number).
-
#message : String
The error message (required).
-
#param : JSON::Any | Nil
The parameter that caused the error (optional, can be any value).
-
#type : String | Nil
The error type (optional).
Constructor Detail
def self.new(message : String, type : String | Nil = nil, param : JSON::Any | Nil = nil, code : String | Int64 | Nil = nil)
#