pub struct ChoiceMessage {
pub role: String,
pub content: Option<String>,
pub reasoning_content: Option<String>,
pub refusal: Option<String>,
pub tool_calls: Option<Vec<ToolCall>>,
}Expand description
The generated chat completion message.
Fields§
§role: StringThe role that the message belongs to, the response from model is always "assistant".
content: Option<String>The content of the message.
reasoning_content: Option<String>The reasoning trace generated by the model.
refusal: Option<String>The reason given by model if unable to generate a response.
tool_calls: Option<Vec<ToolCall>>A list of tool calls asked by model for user to perform.
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 · 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 Default for ChoiceMessage
impl Default for ChoiceMessage
Source§fn default() -> ChoiceMessage
fn default() -> ChoiceMessage
Returns the “default value” for a type. Read more
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
Source§impl PartialEq for ChoiceMessage
impl PartialEq for ChoiceMessage
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 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