pub enum AssembledEvent {
MessageStart {
metadata: Value,
},
ContentBlockComplete {
index: u64,
block: ContentBlock,
},
TextDelta {
index: u64,
text: String,
},
ThinkingDelta {
index: u64,
thinking: String,
},
MessageComplete {
stop_reason: Option<String>,
},
}Expand description
Events emitted by the StreamAssembler.
Variants§
MessageStart
The model has started a new message.
ContentBlockComplete
A content block has been fully assembled.
Fields
§
block: ContentBlockThe fully assembled content block.
TextDelta
Incremental text — emitted for every text_delta so callers can
stream text to the user in real time.
ThinkingDelta
Incremental thinking — emitted for every thinking_delta.
MessageComplete
The entire message is complete.
Trait Implementations§
Source§impl Clone for AssembledEvent
impl Clone for AssembledEvent
Source§fn clone(&self) -> AssembledEvent
fn clone(&self) -> AssembledEvent
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 AssembledEvent
impl RefUnwindSafe for AssembledEvent
impl Send for AssembledEvent
impl Sync for AssembledEvent
impl Unpin for AssembledEvent
impl UnsafeUnpin for AssembledEvent
impl UnwindSafe for AssembledEvent
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