pub struct ChatCompletionResponseMessage {
pub content: Option<String>,
pub refusal: Option<String>,
pub tool_calls: Option<ChatCompletionMessageToolCalls>,
pub annotations: Option<Vec<ChatCompletionResponseMessageAnnotation>>,
pub function_call: Option<ChatCompletionResponseMessageFunctionCall>,
pub audio: Option<ChatCompletionResponseMessageAudio>,
}
Expand description
A chat completion message generated by the model.
Fields§
§content: Option<String>
The contents of the message.
refusal: Option<String>
The refusal message generated by the model.
tool_calls: Option<ChatCompletionMessageToolCalls>
§annotations: Option<Vec<ChatCompletionResponseMessageAnnotation>>
Annotations for the message, when applicable, as when using the web search tool.
function_call: Option<ChatCompletionResponseMessageFunctionCall>
Deprecated and replaced by tool_calls
. The name and arguments of a function that should be called, as generated by the model.
audio: Option<ChatCompletionResponseMessageAudio>
If the audio output modality is requested, this object contains data about the audio response from the model. Learn more.
Implementations§
Source§impl ChatCompletionResponseMessage
impl ChatCompletionResponseMessage
Sourcepub fn builder() -> ChatCompletionResponseMessageBuilder<((), (), (), (), (), ())>
pub fn builder() -> ChatCompletionResponseMessageBuilder<((), (), (), (), (), ())>
Create a builder for building ChatCompletionResponseMessage
.
On the builder, call .content(...)
(optional), .refusal(...)
(optional), .tool_calls(...)
(optional), .annotations(...)
(optional), .function_call(...)
(optional), .audio(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of ChatCompletionResponseMessage
.
Trait Implementations§
Source§impl Clone for ChatCompletionResponseMessage
impl Clone for ChatCompletionResponseMessage
Source§fn clone(&self) -> ChatCompletionResponseMessage
fn clone(&self) -> ChatCompletionResponseMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for ChatCompletionResponseMessage
impl Default for ChatCompletionResponseMessage
Source§fn default() -> ChatCompletionResponseMessage
fn default() -> ChatCompletionResponseMessage
Source§impl<'de> Deserialize<'de> for ChatCompletionResponseMessage
impl<'de> Deserialize<'de> for ChatCompletionResponseMessage
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl PartialEq for ChatCompletionResponseMessage
impl PartialEq for ChatCompletionResponseMessage
Source§fn eq(&self, other: &ChatCompletionResponseMessage) -> bool
fn eq(&self, other: &ChatCompletionResponseMessage) -> bool
self
and other
values to be equal, and is used by ==
.