Class: OpenAI::Models::Live::DecisionEvent::Event

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

Overview

See Also:

  • OpenAI::Models::Live::DecisionEvent#event

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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 ⇒ Event

Returns a new instance of Event.

Parameters:

  • decision —

    The native Decision API response, including its model, ordered answers, and token usage.

  • decision: (OpenAI::Decision)
  • type: (:"decision.completed")


77
78
79
80
# File 'sig/openai/models/live/decision_event.rbs', line 77

def initialize: (
  decision: OpenAI::Decision,
  ?type: :"decision.completed"
) -> void

Instance Attribute Details

#decision ⇒ OpenAI::Decision

The native Decision API response, including its model, ordered answers, and token usage.

Returns:



77
# File 'lib/openai/models/live/decision_event.rb', line 77

required :decision, -> { OpenAI::Decision }

#type ⇒ Symbol, :"decision.completed"

Parameters:

Returns:



82
# File 'lib/openai/models/live/decision_event.rb', line 82

required :type, const: :"decision.completed"

Instance Method Details

#to_hash ⇒ { decision: OpenAI::Decision, ?type: :"decision.completed" }

Returns:



82
83
84
85
# File 'sig/openai/models/live/decision_event.rbs', line 82

def to_hash: -> {
  decision: OpenAI::Decision,
  ?type: :"decision.completed"
}