Struct async_openai::types::ChatCompletionResponseMessage
source · pub struct ChatCompletionResponseMessage {
pub content: Option<String>,
pub tool_calls: Option<Vec<ChatCompletionMessageToolCall>>,
pub role: Role,
pub function_call: Option<FunctionCall>,
}
Expand description
A chat completion message generated by the model.
Fields§
§content: Option<String>
The contents of the message.
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.
Trait Implementations§
source§impl Clone for ChatCompletionResponseMessage
impl Clone for ChatCompletionResponseMessage
source§fn clone(&self) -> ChatCompletionResponseMessage
fn clone(&self) -> ChatCompletionResponseMessage
Returns a copy 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
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ChatCompletionResponseMessage
Auto Trait Implementations§
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