struct AI::OpenAI::OpenAIErrorInfo

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

Defined in:

ai/openai/openai_error.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(message : String, type : String | Nil = nil, param : JSON::Any | Nil = nil, code : String | Int64 | Nil = nil) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]

Instance Method Detail

def code : String | Int64 | Nil #

The error code (optional, can be string or number).


[View source]
def message : String #

The error message (required).


[View source]
def param : JSON::Any | Nil #

The parameter that caused the error (optional, can be any value).


[View source]
def type : String | Nil #

The error type (optional).


[View source]