Class: OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseOutputTextAnnotationWsAdded

Inherits:
OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent show all
Defined in:
lib/openai/models/beta/beta_responses_server_event.rb,
sig/openai/models/beta/beta_responses_server_event.rbs

Instance Attribute Summary collapse

Attributes inherited from OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent

#agent, #annotation, #annotation_index, #content_index, #item_id, #output_index, #sequence_number, #type

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent

variants

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

Returns a new instance of BetaResponseOutputTextAnnotationWsAdded.

Parameters:

  • annotation —

    The annotation object being added. (See annotation schema for details.)

  • annotation_index —

    The index of the annotation within the content part.

  • content_index —

    The index of the content part within the output item.

  • item_id —

    The unique identifier of the item to which the annotation is being added.

  • output_index —

    The index of the output item in the response's output array.

  • sequence_number —

    The sequence number of this event.

  • agent —

    The agent that owns this multi-agent streaming 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_text.annotation.added'.

  • annotation: (OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::annotation, nil)
  • annotation_index: (Integer)
  • content_index: (Integer)
  • item_id: (String)
  • output_index: (Integer)
  • sequence_number: (Integer)
  • agent: (OpenAI::Beta::BetaResponseOutputTextAnnotationAddedEvent::Agent, nil)
  • stream_id: (String)
  • type: (:"response.output_text.annotation.added")


3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
# File 'sig/openai/models/beta/beta_responses_server_event.rbs', line 3058

def initialize: (
  annotation: OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::annotation?,
  annotation_index: Integer,
  content_index: Integer,
  item_id: String,
  output_index: Integer,
  sequence_number: Integer,
  ?agent: OpenAI::Beta::BetaResponseOutputTextAnnotationAddedEvent::Agent?,
  ?stream_id: String,
  ?type: :"response.output_text.annotation.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)


2195
# File 'lib/openai/models/beta/beta_responses_server_event.rb', line 2195

optional :stream_id, String

Instance Method Details

#to_hash ⇒ { annotation: OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::annotation?, annotation_index: Integer, content_index: Integer, item_id: String, output_index: Integer, sequence_number: Integer, ?type: :"response.output_text.annotation.added", ?agent: OpenAI::Beta::BetaResponseOutputTextAnnotationAddedEvent::Agent?, ?stream_id: String }

Returns:

  • ({ annotation: OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::annotation?, annotation_index: Integer, content_index: Integer, item_id: String, output_index: Integer, sequence_number: Integer, ?type: :"response.output_text.annotation.added", ?agent: OpenAI::Beta::BetaResponseOutputTextAnnotationAddedEvent::Agent?, ?stream_id: String })


3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
# File 'sig/openai/models/beta/beta_responses_server_event.rbs', line 3070

def to_hash: -> {
  annotation: OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::annotation?,
  annotation_index: Integer,
  content_index: Integer,
  item_id: String,
  output_index: Integer,
  sequence_number: Integer,
  ?type: :"response.output_text.annotation.added",
  ?agent: OpenAI::Beta::BetaResponseOutputTextAnnotationAddedEvent::Agent?,
  ?stream_id: String
}