Class: OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent

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

Defined Under Namespace

Modules: Annotation

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(annotation:, annotation_index:, content_index:, item_id:, output_index:, sequence_number:, type: :"response.output_text.annotation.added") ⇒ ResponseOutputTextAnnotationAddedEvent

Returns a new instance of ResponseOutputTextAnnotationAddedEvent.

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.

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

    The type of the event. Always 'response.output_text.annotation.added'.

  • annotation: (OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::annotation, nil)
  • annotation_index: (Integer)
  • content_index: (Integer)
  • item_id: (String)
  • output_index: (Integer)
  • sequence_number: (Integer)
  • type: (:"response.output_text.annotation.added") (defaults to: :"response.output_text.annotation.added")


# File 'lib/openai/models/responses/response_output_text_annotation_added_event.rb', line 53

Instance Attribute Details

#annotation ⇒ OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::annotation?

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

Returns:

  • (OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::annotation, nil)


11
12
13
14
15
# File 'lib/openai/models/responses/response_output_text_annotation_added_event.rb', line 11

required(
  :annotation,
  union: -> { OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation },
  nil?: true
)

#annotation_index ⇒ Integer

The index of the annotation within the content part.

Returns:

  • (Integer)


21
# File 'lib/openai/models/responses/response_output_text_annotation_added_event.rb', line 21

required :annotation_index, Integer

#content_index ⇒ Integer

The index of the content part within the output item.

Returns:

  • (Integer)


27
# File 'lib/openai/models/responses/response_output_text_annotation_added_event.rb', line 27

required :content_index, Integer

#item_id ⇒ String

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

Returns:

  • (String)


33
# File 'lib/openai/models/responses/response_output_text_annotation_added_event.rb', line 33

required :item_id, String

#output_index ⇒ Integer

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

Returns:

  • (Integer)


39
# File 'lib/openai/models/responses/response_output_text_annotation_added_event.rb', line 39

required :output_index, Integer

#sequence_number ⇒ Integer

The sequence number of this event.

Returns:

  • (Integer)


45
# File 'lib/openai/models/responses/response_output_text_annotation_added_event.rb', line 45

required :sequence_number, Integer

#type ⇒ :"response.output_text.annotation.added"

The type of the event. Always 'response.output_text.annotation.added'.

Returns:



51
# File 'lib/openai/models/responses/response_output_text_annotation_added_event.rb', line 51

required :type, const: :"response.output_text.annotation.added"

Instance Method Details

#to_hash ⇒ { annotation: OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::annotation?, annotation_index: Integer, content_index: Integer, item_id: String, output_index: Integer, sequence_number: Integer, ?type: :"response.output_text.annotation.added" }

Returns:

  • ({ annotation: OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::annotation?, annotation_index: Integer, content_index: Integer, item_id: String, output_index: Integer, sequence_number: Integer, ?type: :"response.output_text.annotation.added" })


61
62
63
64
65
66
67
68
69
# File 'sig/openai/models/responses/response_output_text_annotation_added_event.rbs', line 61

def to_hash: -> {
  annotation: OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::annotation?,
  annotation_index: Integer,
  content_index: Integer,
  item_id: String,
  output_index: Integer,
  sequence_number: Integer,
  ?type: :"response.output_text.annotation.added"
}