Class: OpenAI::Models::Chat::ChatCompletionMessage::Annotation
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Chat::ChatCompletionMessage::Annotation
- Defined in:
- lib/openai/models/chat/chat_completion_message.rb
Defined Under Namespace
Classes: URLCitation
Instance Attribute Summary collapse
-
#type ⇒ Symbol, :url_citation
The type of the URL citation.
-
#url_citation ⇒ OpenAI::Models::Chat::ChatCompletionMessage::Annotation::URLCitation
A URL citation when using web search.
Instance Method Summary collapse
-
#initialize(url_citation: , type: :url_citation) ⇒ Object
constructor
A URL citation when using web search.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #dump, dump, #inspect, inspect, 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(url_citation: , type: :url_citation) ⇒ Object
A URL citation when using web search.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 85 class Annotation < OpenAI::Internal::Type::BaseModel # @!attribute type # The type of the URL citation. Always `url_citation`. # # @return [Symbol, :url_citation] required :type, const: :url_citation # @!attribute url_citation # A URL citation when using web search. # # @return [OpenAI::Models::Chat::ChatCompletionMessage::Annotation::URLCitation] required :url_citation, -> { OpenAI::Chat::ChatCompletionMessage::Annotation::URLCitation } # @!method initialize(url_citation:, type: :url_citation) # A URL citation when using web search. # # @param url_citation [OpenAI::Models::Chat::ChatCompletionMessage::Annotation::URLCitation] A URL citation when using web search. # # @param type [Symbol, :url_citation] The type of the URL citation. Always `url_citation`. # @see OpenAI::Models::Chat::ChatCompletionMessage::Annotation#url_citation class URLCitation < OpenAI::Internal::Type::BaseModel # @!attribute end_index # The index of the last character of the URL citation in the message. # # @return [Integer] required :end_index, Integer # @!attribute start_index # The index of the first character of the URL citation in the message. # # @return [Integer] required :start_index, Integer # @!attribute title # The title of the web resource. # # @return [String] required :title, String # @!attribute url # The URL of the web resource. # # @return [String] required :url, String # @!method initialize(end_index:, start_index:, title:, url:) # A URL citation when using web search. # # @param end_index [Integer] The index of the last character of the URL citation in the message. # # @param start_index [Integer] The index of the first character of the URL citation in the message. # # @param title [String] The title of the web resource. # # @param url [String] The URL of the web resource. end end |
Instance Attribute Details
#type ⇒ Symbol, :url_citation
The type of the URL citation. Always ‘url_citation`.
90 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 90 required :type, const: :url_citation |
#url_citation ⇒ OpenAI::Models::Chat::ChatCompletionMessage::Annotation::URLCitation
A URL citation when using web search.
96 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 96 required :url_citation, -> { OpenAI::Chat::ChatCompletionMessage::Annotation::URLCitation } |