Class: OpenAI::Models::Safety::SafetyAlert
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Safety::SafetyAlert
- Defined in:
- lib/openai/models/safety/safety_alert.rb,
sig/openai/models/safety/safety_alert.rbs
Overview
Defined Under Namespace
Modules: ErrorType
Instance Attribute Summary collapse
- #created_at ⇒ Integer
-
#detailed_explanation ⇒ String?
A generated explanation, temporarily available for eligible zero data retention alerts.
- #error_type ⇒ Symbol, OpenAI::Models::Safety::SafetyAlert::ErrorType
- #id ⇒ String
- #model ⇒ String
- #object ⇒ Symbol, :"safety.alert"
-
#reason ⇒ String?
A customer-safe description derived from error_type, or null for zero data retention requests.
- #request_id ⇒ String
-
#request_paused ⇒ Boolean
Whether block registration succeeded for this request.
- #response_id ⇒ String
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(id:, created_at:, error_type:, model:, reason:, request_id:, request_paused:, response_id:, detailed_explanation: nil, object: :"safety.alert") ⇒ SafetyAlert
constructor
A new instance of SafetyAlert.
- #to_hash ⇒ { id: String, created_at: Integer, error_type: OpenAI::Models::Safety::SafetyAlert::error_type, model: String, ?object: :"safety.alert", reason: String?, request_id: String, request_paused: bool, response_id: String, ?detailed_explanation: String? }
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(id:, created_at:, error_type:, model:, reason:, request_id:, request_paused:, response_id:, detailed_explanation: nil, object: :"safety.alert") ⇒ SafetyAlert
Returns a new instance of SafetyAlert.
|
|
# File 'lib/openai/models/safety/safety_alert.rb', line 64
|
Instance Attribute Details
#created_at ⇒ Integer
16 |
# File 'lib/openai/models/safety/safety_alert.rb', line 16 required :created_at, Integer |
#detailed_explanation ⇒ String?
A generated explanation, temporarily available for eligible zero data retention alerts. Omitted when unavailable.
62 |
# File 'lib/openai/models/safety/safety_alert.rb', line 62 optional :detailed_explanation, String, nil?: true |
#error_type ⇒ Symbol, OpenAI::Models::Safety::SafetyAlert::ErrorType
21 |
# File 'lib/openai/models/safety/safety_alert.rb', line 21 required :error_type, enum: -> { OpenAI::Safety::SafetyAlert::ErrorType } |
#id ⇒ String
11 |
# File 'lib/openai/models/safety/safety_alert.rb', line 11 required :id, String |
#model ⇒ String
26 |
# File 'lib/openai/models/safety/safety_alert.rb', line 26 required :model, String |
#object ⇒ Symbol, :"safety.alert"
31 |
# File 'lib/openai/models/safety/safety_alert.rb', line 31 required :object, const: :"safety.alert" |
#reason ⇒ String?
A customer-safe description derived from error_type, or null for zero data retention requests.
38 |
# File 'lib/openai/models/safety/safety_alert.rb', line 38 required :reason, String, nil?: true |
#request_id ⇒ String
43 |
# File 'lib/openai/models/safety/safety_alert.rb', line 43 required :request_id, String |
#request_paused ⇒ Boolean
Whether block registration succeeded for this request. This does not confirm that response execution stopped.
50 |
# File 'lib/openai/models/safety/safety_alert.rb', line 50 required :request_paused, OpenAI::Internal::Type::Boolean |
#response_id ⇒ String
55 |
# File 'lib/openai/models/safety/safety_alert.rb', line 55 required :response_id, String |
Instance Method Details
#to_hash ⇒ { id: String, created_at: Integer, error_type: OpenAI::Models::Safety::SafetyAlert::error_type, model: String, ?object: :"safety.alert", reason: String?, request_id: String, request_paused: bool, response_id: String, ?detailed_explanation: String? }
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'sig/openai/models/safety/safety_alert.rbs', line 69
def to_hash: -> {
id: String,
created_at: Integer,
error_type: OpenAI::Models::Safety::SafetyAlert::error_type,
model: String,
?object: :"safety.alert",
reason: String?,
request_id: String,
request_paused: bool,
response_id: String,
?detailed_explanation: String?
}
|