Class: OpenAI::Models::Responses::Response::Moderation::Input::Error

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response.rb,
sig/openai/models/responses/response.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



378
# File 'sig/openai/models/responses/response.rbs', line 378

def initialize: (

Instance Attribute Details

#codeString

The error code.

Parameters:

  • value (String)

Returns:

  • (String)


671
# File 'lib/openai/models/responses/response.rb', line 671

required :code, String

#messageString

The error message.

Parameters:

  • value (String)

Returns:

  • (String)


677
# File 'lib/openai/models/responses/response.rb', line 677

required :message, String

#typeSymbol, :error

The object type, which was always error for moderation failures.

Parameters:

  • value (:error)

Returns:

  • (Symbol, :error)


683
# File 'lib/openai/models/responses/response.rb', line 683

required :type, const: :error

Instance Method Details

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

Returns:

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


384
# File 'sig/openai/models/responses/response.rbs', line 384

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