pub struct ChoiceDelta {
pub content: Option<String>,
pub reasoning_content: Option<String>,
pub function_call: Option<ChoiceDeltaFunctionCall>,
pub refusal: Option<String>,
pub role: Option<CompletionRole>,
pub tool_calls: Option<Vec<ChoiceDeltaToolCall>>,
pub annotations: Option<Vec<Annotation>>,
pub audio: Option<ChatCompletionAudio>,
}Fields§
§content: Option<String>The contents of the chunk message.
reasoning_content: Option<String>The reasoning contents of the chunk message. Only present for thinking models (DeepSeek, Qwen3, and other reasoning models served by OpenAI-compatible backends).
function_call: Option<ChoiceDeltaFunctionCall>Deprecated and replaced by tool_calls.
The name and arguments of a function that should be called, as generated by the model.
refusal: Option<String>The refusal message generated by the model.
role: Option<CompletionRole>The role of the author of this message.
tool_calls: Option<Vec<ChoiceDeltaToolCall>>A list of tool calls generated by the model, such as function calls.
annotations: Option<Vec<Annotation>>Annotations for the chunk message, such as URL citations emitted by search deployments.
Not part of the official OpenAI chunk schema, but Azure OpenAI
(“on your data” / search deployments) streams annotations
inside delta, and dropping them silently loses the citations.
audio: Option<ChatCompletionAudio>Data about a streamed audio response from the model.
Not part of the official OpenAI chunk schema, but audio-capable
Azure OpenAI deployments stream audio inside delta.
Trait Implementations§
Source§impl Clone for ChoiceDelta
impl Clone for ChoiceDelta
Source§fn clone(&self) -> ChoiceDelta
fn clone(&self) -> ChoiceDelta
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more