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.
-
#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::ChatCompletionMessageFunctionToolCall, OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall>?
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, meta_info, new_coerce_state, 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).
38 39 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 38 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).
47 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 47 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.
56 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 56 optional :function_call, -> { OpenAI::Chat::ChatCompletionMessage::FunctionCall } |
#refusal ⇒ String?
The refusal message generated by the model.
25 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 25 required :refusal, String, nil?: true |
#role ⇒ Symbol, :assistant
The role of the author of this message.
31 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 31 required :role, const: :assistant |
#tool_calls ⇒ Array<OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall, OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall>?
The tool calls generated by the model, such as function calls.
62 63 |
# File 'lib/openai/models/chat/chat_completion_message.rb', line 62 optional :tool_calls, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Chat::ChatCompletionMessageToolCall] } |