Class: OpenAI::Models::Responses::Response::Moderation::Input::Error
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Responses::Response::Moderation::Input::Error
- Defined in:
- lib/openai/models/responses/response.rb,
sig/openai/models/responses/response.rbs
Instance Attribute Summary collapse
-
#code ⇒ String
The error code.
-
#message ⇒ String
The error message.
-
#type ⇒ :error
The object type, which was always
errorfor moderation failures.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize ⇒ Error
constructor
A new instance of Error.
- #to_hash ⇒ { code: String, message: String, ?type: :error }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize ⇒ Error
Returns a new instance of Error.
1007 1008 1009 1010 1011 |
# File 'sig/openai/models/responses/response.rbs', line 1007
def initialize: (
code: String,
message: String,
?type: :error
) -> void
|
Instance Attribute Details
#code ⇒ String
The error code.
1008 |
# File 'lib/openai/models/responses/response.rb', line 1008 required :code, String |
#message ⇒ String
The error message.
1014 |
# File 'lib/openai/models/responses/response.rb', line 1014 required :message, String |
#type ⇒ :error
The object type, which was always error for moderation failures.
1020 |
# File 'lib/openai/models/responses/response.rb', line 1020 required :type, const: :error |
Instance Method Details
#to_hash ⇒ { code: String, message: String, ?type: :error }
1013 |
# File 'sig/openai/models/responses/response.rbs', line 1013
def to_hash: -> { code: String, message: String, ?type: :error }
|