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),
}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.
Trait Implementations§
Source§impl<R> Clone for RawStreamingChoice<R>
impl<R> Clone for RawStreamingChoice<R>
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 moreAuto Trait Implementations§
impl<R> Freeze for RawStreamingChoice<R>where
R: Freeze,
impl<R> RefUnwindSafe for RawStreamingChoice<R>where
R: RefUnwindSafe,
impl<R> Send for RawStreamingChoice<R>where
R: Send,
impl<R> Sync for RawStreamingChoice<R>where
R: Sync,
impl<R> Unpin for RawStreamingChoice<R>where
R: Unpin,
impl<R> UnsafeUnpin for RawStreamingChoice<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for RawStreamingChoice<R>where
R: UnwindSafe,
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
Source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more