pub struct ChatCompletionResponseMessage {
pub content: Option<String>,
pub refusal: Option<String>,
pub tool_calls: Option<Vec<ChatCompletionMessageToolCall>>,
pub role: Role,
pub function_call: Option<FunctionCall>,
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<Vec<ChatCompletionMessageToolCall>>
The tool calls generated by the model, such as function calls.
role: Role
The role of the author of this message.
function_call: Option<FunctionCall>
👎Deprecated
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.
Trait Implementations§
Source§impl Clone for ChatCompletionResponseMessage
impl Clone for ChatCompletionResponseMessage
Source§fn clone(&self) -> ChatCompletionResponseMessage
fn clone(&self) -> ChatCompletionResponseMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ChatCompletionResponseMessage
impl PartialEq for ChatCompletionResponseMessage
Source§fn eq(&self, other: &ChatCompletionResponseMessage) -> bool
fn eq(&self, other: &ChatCompletionResponseMessage) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ChatCompletionResponseMessage
Auto Trait Implementations§
impl Freeze for ChatCompletionResponseMessage
impl RefUnwindSafe for ChatCompletionResponseMessage
impl Send for ChatCompletionResponseMessage
impl Sync for ChatCompletionResponseMessage
impl Unpin for ChatCompletionResponseMessage
impl UnwindSafe for ChatCompletionResponseMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more