Class: OpenAI::Models::Beta::BetaResponseOutputItemAddedEvent

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

Defined Under Namespace

Classes: Agent

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_with_error, 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(item:, output_index:, sequence_number:, agent: nil, type: :"response.output_item.added") ⇒ Object

Parameters:

  • item —

    The output item that was added. For reasoning items, encrypted_content may be incomplete while the item is in progress. Use the reasoning item from the corresponding response.output_item.done event when passing it as input to a subsequent request.

  • output_index —

    The index of the output item that was added.

  • sequence_number —

    The sequence number of this event.

  • agent (defaults to: nil) —

    The agent that owns this multi-agent streaming event.

  • type (defaults to: :"response.output_item.added") —

    The type of the event. Always response.output_item.added.



# File 'lib/openai/models/beta/beta_response_output_item_added_event.rb', line 40

Instance Attribute Details

#agent ⇒ OpenAI::Beta::BetaResponseOutputItemAddedEvent::Agent?

The agent that owns this multi-agent streaming event.

Returns:

  • (OpenAI::Beta::BetaResponseOutputItemAddedEvent::Agent, nil)


38
# File 'lib/openai/models/beta/beta_response_output_item_added_event.rb', line 38

optional :agent, -> { OpenAI::Beta::BetaResponseOutputItemAddedEvent::Agent }, nil?: true

#item ⇒ OpenAI::Models::Beta::beta_response_output_item

The output item that was added. For reasoning items, encrypted_content may be incomplete while the item is in progress. Use the reasoning item from the corresponding response.output_item.done event when passing it as input to a subsequent request.

Returns:

  • (OpenAI::Models::Beta::beta_response_output_item)


14
# File 'lib/openai/models/beta/beta_response_output_item_added_event.rb', line 14

required :item, union: -> { OpenAI::Beta::BetaResponseOutputItem }

#output_index ⇒ Integer

The index of the output item that was added.

Returns:

  • (Integer)


20
# File 'lib/openai/models/beta/beta_response_output_item_added_event.rb', line 20

required :output_index, Integer

#sequence_number ⇒ Integer

The sequence number of this event.

Returns:

  • (Integer)


26
# File 'lib/openai/models/beta/beta_response_output_item_added_event.rb', line 26

required :sequence_number, Integer

#type ⇒ :"response.output_item.added"

The type of the event. Always response.output_item.added.

Returns:

  • (:"response.output_item.added")


32
# File 'lib/openai/models/beta/beta_response_output_item_added_event.rb', line 32

required :type, const: :"response.output_item.added"

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


55
# File 'sig/openai/models/beta/beta_response_output_item_added_event.rbs', line 55

def to_hash: -> {