Class: OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation

Inherits:
Internal::Type::BaseModel
  • Object
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

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

Returns a new instance of FileCitation.

Parameters:

  • file_id —

    The ID of the file.

  • filename —

    The filename of the file cited.

  • index —

    The index in the output text at which to insert the file citation.

  • type —

    The type of the file citation. Always file_citation.

  • file_id: (String)
  • filename: (String)
  • index: (Integer)
  • type: (:file_citation)


109
110
111
112
113
114
# File 'sig/openai/models/responses/response_output_text_annotation_added_event.rbs', line 109

def initialize: (
  file_id: String,
  filename: String,
  index: Integer,
  ?type: :file_citation
) -> void

Instance Attribute Details

#file_id ⇒ String

The ID of the file.

Returns:

  • (String)


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

required :file_id, String

#filename ⇒ String

The filename of the file cited.

Returns:

  • (String)


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

required :filename, String

#index ⇒ Integer

The index in the output text at which to insert the file citation.

Returns:

  • (Integer)


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

required :index, Integer

#type ⇒ :file_citation

The type of the file citation. Always file_citation.

Returns:

  • (:file_citation)


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

required :type, const: :file_citation

Instance Method Details

#to_hash ⇒ { file_id: String, filename: String, index: Integer, ?type: :file_citation }

Returns:

  • ({ file_id: String, filename: String, index: Integer, ?type: :file_citation })


116
117
118
119
120
121
# File 'sig/openai/models/responses/response_output_text_annotation_added_event.rbs', line 116

def to_hash: -> {
  file_id: String,
  filename: String,
  index: Integer,
  ?type: :file_citation
}