pub struct ChatCompletionResponseMessage {
pub content: Option<ChatCompletionMessageContent>,
pub refusal: Option<String>,
pub tool_calls: Option<Vec<ChatCompletionMessageToolCall>>,
pub role: Role,
pub function_call: Option<FunctionCall>,
pub audio: Option<ChatCompletionResponseMessageAudio>,
pub reasoning_content: Option<String>,
}Expand description
Chat completion response message with multimodal content and reasoning.
Extends upstream ChatCompletionResponseMessage with:
content:Option<ChatCompletionMessageContent>(multimodal) instead ofOption<String>reasoning_content: model reasoning output (DeepSeek-R1, QwQ)
Fields§
§content: Option<ChatCompletionMessageContent>Always serialized (as null when None) so clients can rely on the
content key being present alongside reasoning_content or
tool_calls. Matches the upstream OpenAI API shape (DGH-651).
refusal: Option<String>§tool_calls: Option<Vec<ChatCompletionMessageToolCall>>§role: Role§function_call: Option<FunctionCall>👎Deprecated
§audio: Option<ChatCompletionResponseMessageAudio>§reasoning_content: Option<String>Reasoning content produced by the model (DeepSeek-R1, QwQ).
Accepts either reasoning_content (DeepSeek / SGLang / TRT-LLM
canonical) or reasoning (vLLM native / OpenRouter / OpenAI GPT-OSS)
on input via the alias; output-side key selection is handled at the
HTTP boundary by ai-dynamo/dynamo#11464’s RoutedReasoning wrapper.
Trait Implementations§
Source§impl Clone for ChatCompletionResponseMessage
impl Clone for ChatCompletionResponseMessage
Source§fn clone(&self) -> ChatCompletionResponseMessage
fn clone(&self) -> ChatCompletionResponseMessage
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<'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
impl StructuralPartialEq for ChatCompletionResponseMessage
Auto Trait Implementations§
impl Freeze for ChatCompletionResponseMessage
impl RefUnwindSafe for ChatCompletionResponseMessage
impl Send for ChatCompletionResponseMessage
impl Sync for ChatCompletionResponseMessage
impl Unpin for ChatCompletionResponseMessage
impl UnsafeUnpin 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