pub struct ChoiceMessage {
pub role: String,
pub content: Option<String>,
pub reasoning_content: Option<String>,
pub tool_calls: Option<Vec<ToolCall>>,
}Fields§
§role: String§content: Option<String>§reasoning_content: Option<String>Reasoning/thinking content returned separately by reasoning models
(e.g. DeepSeek R1 via official API or vLLM with –reasoning-parser).
When present, content already excludes the thinking — no tag stripping needed.
tool_calls: Option<Vec<ToolCall>>Trait Implementations§
Source§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
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more