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

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'.



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


Instance Attribute Details

#annotationOpenAI::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_indexInteger

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_indexInteger

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_idString

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_indexInteger

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_numberInteger

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{

Returns:

  • ({)


61
# File 'sig/openai/models/responses/response_output_text_annotation_added_event.rbs', line 61

def to_hash: -> {