pub enum RawStreamingChoice<R>where
R: Clone,{
Message(String),
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
ToolCall(RawStreamingToolCall)
A tool call response (in its entirety)
ToolCallDelta
A tool call partial/delta
Fields
§
content: ToolCallDeltaContentReasoning
A reasoning (in its entirety)
ReasoningDelta
A reasoning partial/delta
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>where
R: Clone,
impl<R> Clone for RawStreamingChoice<R>where
R: Clone,
Source§fn clone(&self) -> RawStreamingChoice<R>
fn clone(&self) -> RawStreamingChoice<R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Mutably borrows from an owned value. Read more