Class: OpenAI::Models::Chat::ChatCompletionMessage
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Chat::ChatCompletionMessage
- Defined in:
- lib/openai/models/chat/chat_completion_message.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Annotation, FunctionCall
Instance Attribute Summary collapse
-
#annotations ⇒ Array<OpenAI::Models::Chat::ChatCompletionMessage::Annotation>?
Annotations for the message, when applicable, as when using the [web search tool](platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
-
#audio ⇒ OpenAI::Models::Chat::ChatCompletionAudio?
If the audio output modality is requested, this object contains data about the audio response from the model.
-
#content ⇒ String?
The contents of the message.
- #function_call ⇒ OpenAI::Models::Chat::ChatCompletionMessage::FunctionCall? deprecated Deprecated.
-
#parsed ⇒ Object?
The parsed contents of the message, if JSON schema is specified.
-
#refusal ⇒ String?
The refusal message generated by the model.
-
#role ⇒ Symbol, :assistant
The role of the author of this message.
-
#tool_calls ⇒ Array<OpenAI::Models::Chat::ChatCompletionMessageToolCall>?
The tool calls generated by the model, such as function calls.
Instance Method Summary collapse
-
#initialize(end_index: , start_index: , title: , url: ) ⇒ 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(end_index: , start_index: , title: , url: ) ⇒ Object
A URL citation when using web search.
|
# File 'lib/openai/models/chat/chat_completion_message.rb', line 131
|
Instance Attribute Details
#annotations ⇒ Array<OpenAI::Models::Chat::ChatCompletionMessage::Annotation>?
Annotations for the message, when applicable, as when using the [web search tool](platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
36 37 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 36 optional :annotations, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionMessage::Annotation] } |
#audio ⇒ OpenAI::Models::Chat::ChatCompletionAudio?
If the audio output modality is requested, this object contains data about the audio response from the model. [Learn more](platform.openai.com/docs/guides/audio).
45 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 45 optional :audio, -> { OpenAI::Chat::ChatCompletionAudio }, nil?: true |
#content ⇒ String?
The contents of the message.
11 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 11 required :content, String, nil?: true |
#function_call ⇒ OpenAI::Models::Chat::ChatCompletionMessage::FunctionCall?
Deprecated and replaced by ‘tool_calls`. The name and arguments of a function that should be called, as generated by the model.
54 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 54 optional :function_call, -> { OpenAI::Chat::ChatCompletionMessage::FunctionCall } |
#parsed ⇒ Object?
The parsed contents of the message, if JSON schema is specified.
17 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 17 optional :parsed, OpenAI::Internal::Type::Unknown |
#refusal ⇒ String?
The refusal message generated by the model.
23 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 23 required :refusal, String, nil?: true |
#role ⇒ Symbol, :assistant
The role of the author of this message.
29 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 29 required :role, const: :assistant |
#tool_calls ⇒ Array<OpenAI::Models::Chat::ChatCompletionMessageToolCall>?
The tool calls generated by the model, such as function calls.
60 61 62 63 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 60 optional :tool_calls, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionMessageToolCall] } |