Class: OpenAI::Models::Responses::ResponsesServerEvent::ResponseOutputItemWsAdded

Inherits:
OpenAI::Models::Responses::ResponseOutputItemAddedEvent show all
Defined in:
lib/openai/models/responses/responses_server_event.rb,
sig/openai/models/responses/responses_server_event.rbs

Instance Attribute Summary collapse

Attributes inherited from OpenAI::Models::Responses::ResponseOutputItemAddedEvent

#item, #output_index, #sequence_number, #type

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

Returns a new instance of ResponseOutputItemWsAdded.

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.

  • stream_id —

    The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

  • type —

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

  • item: (OpenAI::Models::Responses::response_output_item)
  • output_index: (Integer)
  • sequence_number: (Integer)
  • stream_id: (String)
  • type: (:"response.output_item.added")


1372
1373
1374
1375
1376
1377
1378
# File 'sig/openai/models/responses/responses_server_event.rbs', line 1372

def initialize: (
  item: OpenAI::Models::Responses::response_output_item,
  output_index: Integer,
  sequence_number: Integer,
  ?stream_id: String,
  ?type: :"response.output_item.added"
) -> void

Instance Attribute Details

#stream_id ⇒ String?

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

Returns:

  • (String, nil)


1156
# File 'lib/openai/models/responses/responses_server_event.rb', line 1156

optional :stream_id, String

Instance Method Details

#to_hash ⇒ { item: OpenAI::Models::Responses::response_output_item, output_index: Integer, sequence_number: Integer, ?type: :"response.output_item.added", ?stream_id: String }

Returns:

  • ({ item: OpenAI::Models::Responses::response_output_item, output_index: Integer, sequence_number: Integer, ?type: :"response.output_item.added", ?stream_id: String })


1380
1381
1382
1383
1384
1385
1386
# File 'sig/openai/models/responses/responses_server_event.rbs', line 1380

def to_hash: -> {
  item: OpenAI::Models::Responses::response_output_item,
  output_index: Integer,
  sequence_number: Integer,
  ?type: :"response.output_item.added",
  ?stream_id: String
}