Class: OpenAI::Models::Chat::ChatCompletion::Moderation::Input::Error
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Chat::ChatCompletion::Moderation::Input::Error
- Defined in:
- lib/openai/models/chat/chat_completion.rb,
sig/openai/models/chat/chat_completion.rbs
Instance Attribute Summary collapse
-
#code ⇒ String
The error code.
-
#message ⇒ String
The error message.
-
#type ⇒ :error
The object type, which is always
error.
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.
428 429 430 431 432 |
# File 'sig/openai/models/chat/chat_completion.rbs', line 428
def initialize: (
code: String,
message: String,
?type: :error
) -> void
|
Instance Attribute Details
#code ⇒ String
The error code.
432 |
# File 'lib/openai/models/chat/chat_completion.rb', line 432 required :code, String |
#message ⇒ String
The error message.
438 |
# File 'lib/openai/models/chat/chat_completion.rb', line 438 required :message, String |
#type ⇒ :error
The object type, which is always error.
444 |
# File 'lib/openai/models/chat/chat_completion.rb', line 444 required :type, const: :error |
Instance Method Details
#to_hash ⇒ { code: String, message: String, ?type: :error }
434 |
# File 'sig/openai/models/chat/chat_completion.rbs', line 434
def to_hash: -> { code: String, message: String, ?type: :error }
|