pub struct AssistantMessage {
pub content: Option<String>,
pub audio: Option<AssistantAudio>,
pub refusal: Option<String>,
pub name: Option<String>,
pub prefix: bool,
pub reasoning_content: Option<String>,
pub tool_calls: Option<Vec<AssistantToolCall>>,
}Expand description
An assistant message payload.
Fields§
§content: Option<String>The contents of the assistant message. Required unless tool_calls
or function_call is specified. (Note that function_call is deprecated
in favour of tool_calls.)
audio: Option<AssistantAudio>Data about a previous audio response from the model. Required for multi-turn audio conversations.
refusal: Option<String>The refusal message by the assistant.
name: Option<String>§prefix: boolDeepSeek (Beta): set this to true to force the model to start its
answer by the content of the supplied prefix in this assistant
message. Requires base_url = "https://api.deepseek.com/beta".
reasoning_content: Option<String>The reasoning contents of the assistant message produced by thinking
models (DeepSeek, Qwen3, and other reasoning models served by
OpenAI-compatible backends), before the final answer. Feed it back
in multi-turn thinking conversations; DeepSeek’s Beta
Chat Prefix Completion
also uses it as the CoT input of the last assistant message
(with prefix set to true).
tool_calls: Option<Vec<AssistantToolCall>>The tool calls generated by the model, such as function calls.