Class: OpenAI::Models::Chat::ChatCompletion::Moderation::Output::Error

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/chat/chat_completion.rb,
sig/openai/models/chat/chat_completion.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initializeObject



360
# File 'sig/openai/models/chat/chat_completion.rbs', line 360

def initialize: (

Instance Attribute Details

#codeString

The error code.

Parameters:

  • value (String)

Returns:

  • (String)


501
# File 'lib/openai/models/chat/chat_completion.rb', line 501

required :code, String

#messageString

The error message.

Parameters:

  • value (String)

Returns:

  • (String)


507
# File 'lib/openai/models/chat/chat_completion.rb', line 507

required :message, String

#typeSymbol, :error

The object type, which is always error.

Parameters:

  • value (:error)

Returns:

  • (Symbol, :error)


513
# File 'lib/openai/models/chat/chat_completion.rb', line 513

required :type, const: :error

Instance Method Details

#to_hash{ code: String, message: String, type: :error }

Returns:

  • ({ code: String, message: String, type: :error })


366
# File 'sig/openai/models/chat/chat_completion.rbs', line 366

def to_hash: -> { code: String, message: String, type: :error }