Class: OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb,
sig/openai/models/beta/beta_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 ⇒ URLCitation

Returns a new instance of URLCitation.

Parameters:

  • end_index —

    The index of the last character of the URL citation in the message.

  • start_index —

    The index of the first character of the URL citation in the message.

  • title —

    The title of the web resource.

  • url —

    The URL of the web resource.

  • type —

    The type of the URL citation. Always url_citation.

  • end_index: (Integer)
  • start_index: (Integer)
  • title: (String)
  • url: (String)
  • type: (:url_citation)


169
170
171
172
173
174
175
# File 'sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs', line 169

def initialize: (
  end_index: Integer,
  start_index: Integer,
  title: String,
  url: String,
  ?type: :url_citation
) -> void

Instance Attribute Details

#end_index ⇒ Integer

The index of the last character of the URL citation in the message.

Returns:

  • (Integer)


161
# File 'lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb', line 161

required :end_index, Integer

#start_index ⇒ Integer

The index of the first character of the URL citation in the message.

Returns:

  • (Integer)


167
# File 'lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb', line 167

required :start_index, Integer

#title ⇒ String

The title of the web resource.

Returns:

  • (String)


173
# File 'lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb', line 173

required :title, String

#type ⇒ :url_citation

The type of the URL citation. Always url_citation.

Returns:

  • (:url_citation)


179
# File 'lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb', line 179

required :type, const: :url_citation

#url ⇒ String

The URL of the web resource.

Returns:

  • (String)


185
# File 'lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb', line 185

required :url, String

Instance Method Details

#to_hash ⇒ { end_index: Integer, start_index: Integer, title: String, ?type: :url_citation, url: String }

Returns:

  • ({ end_index: Integer, start_index: Integer, title: String, ?type: :url_citation, url: String })


177
178
179
180
181
182
183
# File 'sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs', line 177

def to_hash: -> {
  end_index: Integer,
  start_index: Integer,
  title: String,
  ?type: :url_citation,
  url: String
}