Class: OpenAI::Models::Chat::ChatCompletionMessage::Annotation::URLCitation

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

Overview

See Also:

  • OpenAI::Models::Chat::ChatCompletionMessage::Annotation#url_citation

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.

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


154
155
156
157
158
159
# File 'sig/openai/models/chat/chat_completion_message.rbs', line 154

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

Instance Attribute Details

#end_index ⇒ Integer

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

Returns:

  • (Integer)


116
# File 'lib/openai/models/chat/chat_completion_message.rb', line 116

required :end_index, Integer

#start_index ⇒ Integer

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

Returns:

  • (Integer)


122
# File 'lib/openai/models/chat/chat_completion_message.rb', line 122

required :start_index, Integer

#title ⇒ String

The title of the web resource.

Returns:

  • (String)


128
# File 'lib/openai/models/chat/chat_completion_message.rb', line 128

required :title, String

#url ⇒ String

The URL of the web resource.

Returns:

  • (String)


134
# File 'lib/openai/models/chat/chat_completion_message.rb', line 134

required :url, String

Instance Method Details

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

Returns:

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


161
162
163
164
165
166
# File 'sig/openai/models/chat/chat_completion_message.rbs', line 161

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