pub struct ChatCompletionMessage {
pub role: Role,
pub audio: Option<ChatCompletionAudio>,
pub content: Option<String>,
pub reasoning_content: Option<String>,
pub tool_calls: Option<Vec<ChatCompletionMessageToolCall>>,
pub refusal: Option<String>,
pub annotations: Option<Vec<Annotation>>,
}Fields§
§role: RoleThe role of the author of this message. This shall always
be Role::Assistant
audio: Option<ChatCompletionAudio>If the audio output modality is requested, this object contains data about the audio response from the model. Learn more from OpenAI.
content: Option<String>The contents of the message.
reasoning_content: Option<String>For thinking models: the reasoning contents of the assistant message, before the final answer.
tool_calls: Option<Vec<ChatCompletionMessageToolCall>>The tool calls generated by the model, such as function calls. Tool calls deserialization is not supported yet.
refusal: Option<String>The refusal message generated by the model.
annotations: Option<Vec<Annotation>>Annotations for the message, when applicable, such as URL citations when the model uses a web search tool.
Trait Implementations§
Source§impl Clone for ChatCompletionMessage
impl Clone for ChatCompletionMessage
Source§fn clone(&self) -> ChatCompletionMessage
fn clone(&self) -> ChatCompletionMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChatCompletionMessage
impl Debug for ChatCompletionMessage
Source§impl<'de> Deserialize<'de> for ChatCompletionMessage
impl<'de> Deserialize<'de> for ChatCompletionMessage
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
Auto Trait Implementations§
impl Freeze for ChatCompletionMessage
impl RefUnwindSafe for ChatCompletionMessage
impl Send for ChatCompletionMessage
impl Sync for ChatCompletionMessage
impl Unpin for ChatCompletionMessage
impl UnsafeUnpin for ChatCompletionMessage
impl UnwindSafe for ChatCompletionMessage
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