pub enum RawStreamingChoice<R>where
R: Clone,{
Message(String),
TextStart {
additional_params: Option<Value>,
},
TextAdditionalParams(Value),
ToolCall(RawStreamingToolCall),
ToolCallDelta {
id: String,
internal_call_id: String,
content: ToolCallDeltaContent,
},
Reasoning {
id: Option<String>,
content: ReasoningContent,
},
ReasoningDelta {
id: Option<String>,
reasoning: String,
},
FinalResponse(R),
MessageId(String),
Unknown(Value),
}Expand description
Enum representing a streaming chunk from the model
Variants§
Message(String)
A text chunk from a message response
TextStart
Start a new text content block in the accumulated final choice.
This is an internal provider-normalization event. It is not yielded to public stream consumers, but lets providers preserve metadata boundaries for final aggregated assistant text blocks.
TextAdditionalParams(Value)
Provider-specific metadata for the current text content block.
This is not yielded to public stream consumers. The metadata is merged
into the current aggregated Text block.
ToolCall(RawStreamingToolCall)
A tool call response (in its entirety)
ToolCallDelta
A tool call partial/delta
Fields
content: ToolCallDeltaContentReasoning
A reasoning (in its entirety)
Fields
content: ReasoningContentComplete reasoning content block.
ReasoningDelta
A reasoning partial/delta
Fields
FinalResponse(R)
The final response object, must be yielded if you want the
response field to be populated on the StreamingCompletionResponse
MessageId(String)
Provider-assigned message ID (e.g. OpenAI Responses API msg_ ID).
Captured silently into StreamingCompletionResponse::message_id.
Unknown(Value)
A provider-native output item this version does not model — e.g. an
OpenAI Responses hosted-tool result (web_search_call, file_search_call,
computer_call, code_interpreter_call). Carries the raw item object
verbatim. Forwarded to the stream consumer as
StreamedAssistantContent::Unknown but not folded into the accumulated
assistant message (there is no AssistantContent::Unknown history slot).
Trait Implementations§
Source§impl<R> Clone for RawStreamingChoice<R>where
R: Clone,
impl<R> Clone for RawStreamingChoice<R>where
R: Clone,
Source§fn clone(&self) -> RawStreamingChoice<R>
fn clone(&self) -> RawStreamingChoice<R>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more