Class: OpenAI::Models::Webhooks::SafetyIdentifierBlockedWebhookEvent

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

Defined Under Namespace

Modules: Object Classes: Data

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

#initialize(safety_category:, safety_identifier:, model: nil, project_id: nil, request_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Data for more details.

Event data payload.

Parameters:

  • safety_category (String)

    The safety category that triggered the block, such as bio or cyber.

  • safety_identifier (String)

    The stable safety identifier associated with the blocked request.

  • model (String) (defaults to: nil)

    The model used for the blocked request, if available.

  • project_id (String) (defaults to: nil)

    The project associated with the blocked request, if available.

  • request_id (String) (defaults to: nil)

    The OpenAI request ID for the blocked request, if available.



# File 'lib/openai/models/webhooks/safety_identifier_blocked_webhook_event.rb', line 37

Instance Attribute Details

#created_atInteger

The Unix timestamp (in seconds) of when the request was blocked.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


17
# File 'lib/openai/models/webhooks/safety_identifier_blocked_webhook_event.rb', line 17

required :created_at, Integer

#dataOpenAI::Models::Webhooks::SafetyIdentifierBlockedWebhookEvent::Data

Event data payload.

Parameters:

  • value (OpenAI::Webhooks::SafetyIdentifierBlockedWebhookEvent::Data)

Returns:



23
# File 'lib/openai/models/webhooks/safety_identifier_blocked_webhook_event.rb', line 23

required :data, -> { OpenAI::Webhooks::SafetyIdentifierBlockedWebhookEvent::Data }

#idString

The unique ID of the event.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/openai/models/webhooks/safety_identifier_blocked_webhook_event.rb', line 11

required :id, String

#objectSymbol, ...

The object of the event. Always event.



35
# File 'lib/openai/models/webhooks/safety_identifier_blocked_webhook_event.rb', line 35

optional :object, enum: -> { OpenAI::Webhooks::SafetyIdentifierBlockedWebhookEvent::Object }

#typeSymbol, :"safety_identifier.blocked"

The type of the event. Always safety_identifier.blocked.

Parameters:

  • value (:"safety_identifier.blocked")

Returns:

  • (Symbol, :"safety_identifier.blocked")


29
# File 'lib/openai/models/webhooks/safety_identifier_blocked_webhook_event.rb', line 29

required :type, const: :"safety_identifier.blocked"

Instance Method Details

#to_hash{

Returns:

  • ({)


36
# File 'sig/openai/models/webhooks/safety_identifier_blocked_webhook_event.rbs', line 36

def to_hash: -> {