pub struct ChoiceMessage {
pub content: Option<String>,
pub reasoning_content: Option<String>,
pub tool_calls: Option<Vec<ToolCall>>,
pub role: Role,
}Expand description
Assistant message content in non-streaming responses.
Fields§
§content: Option<String>The contents of the message.
reasoning_content: Option<String>For thinking mode only. The reasoning contents of the assistant message, before the final answer.
tool_calls: Option<Vec<ToolCall>>The tool calls generated by the model.
role: RoleThe role of the author of this message.
Trait Implementations§
Source§impl Clone for ChoiceMessage
impl Clone for ChoiceMessage
Source§fn clone(&self) -> ChoiceMessage
fn clone(&self) -> ChoiceMessage
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 ChoiceMessage
impl Debug for ChoiceMessage
Source§impl<'de> Deserialize<'de> for ChoiceMessage
impl<'de> Deserialize<'de> for ChoiceMessage
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
impl Eq for ChoiceMessage
Source§impl PartialEq for ChoiceMessage
impl PartialEq for ChoiceMessage
Source§fn eq(&self, other: &ChoiceMessage) -> bool
fn eq(&self, other: &ChoiceMessage) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ChoiceMessage
impl Serialize for ChoiceMessage
impl StructuralPartialEq for ChoiceMessage
Auto Trait Implementations§
impl Freeze for ChoiceMessage
impl RefUnwindSafe for ChoiceMessage
impl Send for ChoiceMessage
impl Sync for ChoiceMessage
impl Unpin for ChoiceMessage
impl UnsafeUnpin for ChoiceMessage
impl UnwindSafe for ChoiceMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.