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>Always serialized (as null when None): the spec marks refusal as
required-and-nullable, and OpenAI emits "refusal": null on every
non-refusal response.
tool_calls: Option<Vec<ChatCompletionMessageToolCall>>§role: Role§function_call: Option<FunctionCall>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.
Not part of the OpenAI spec, so it is omitted entirely when absent.
Trait Implementations§
Source§impl Clone for ChatCompletionResponseMessage
impl Clone for ChatCompletionResponseMessage
Source§fn clone(&self) -> ChatCompletionResponseMessage
fn clone(&self) -> ChatCompletionResponseMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more