pub enum StreamEvent {
ContentDelta(String),
ReasoningDelta(String),
ToolCallStart {
index: usize,
id: String,
name: String,
},
ToolCallDelta {
index: usize,
arguments_delta: String,
},
Usage(Usage),
Done(StopReason),
}Expand description
An event from a streaming chat response.
Variants§
ContentDelta(String)
A chunk of text content.
ReasoningDelta(String)
A chunk of reasoning content.
ToolCallStart
Start of a new tool call.
ToolCallDelta
Incremental arguments JSON for a tool call.
Usage(Usage)
Token usage information.
Done(StopReason)
Generation finished.
Trait Implementations§
Source§impl Clone for StreamEvent
impl Clone for StreamEvent
Source§fn clone(&self) -> StreamEvent
fn clone(&self) -> StreamEvent
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 Freeze for StreamEvent
impl RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin for StreamEvent
impl UnsafeUnpin for StreamEvent
impl UnwindSafe for StreamEvent
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