pub enum AssistantEvent {
TextDelta {
delta: String,
},
ThinkingDelta {
delta: String,
},
ToolcallStart {
tool_id: String,
tool_name: String,
},
ToolcallInputDelta {
tool_id: String,
delta: String,
},
ToolcallInput {
tool_id: String,
input: Value,
},
ToolcallResult {
tool_id: String,
result: String,
},
}Expand description
Granular events emitted by the assistant during a streaming turn.
Carried inside RpcEvent::MessageUpdate.
Variants§
TextDelta
An incremental text chunk from the assistant’s response.
ThinkingDelta
An incremental thinking/reasoning chunk (extended thinking mode).
ToolcallStart
A tool call has started streaming. Subsequent
AssistantEvent::ToolcallInputDelta frames carry the JSON input.
Fields
ToolcallInputDelta
An incremental JSON fragment of a tool call’s input.
Fields
§
tool_id: StringMatches the tool_id from AssistantEvent::ToolcallStart.
ToolcallInput
The complete, finalised input for a tool call.
Fields
§
tool_id: StringMatches the tool_id from AssistantEvent::ToolcallStart.
ToolcallResult
The result returned by tool execution.
Fields
§
tool_id: StringMatches the tool_id from AssistantEvent::ToolcallStart.
Trait Implementations§
Source§impl Clone for AssistantEvent
impl Clone for AssistantEvent
Source§fn clone(&self) -> AssistantEvent
fn clone(&self) -> AssistantEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AssistantEvent
impl Debug for AssistantEvent
Source§impl<'de> Deserialize<'de> for AssistantEvent
impl<'de> Deserialize<'de> for AssistantEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AssistantEvent
impl PartialEq for AssistantEvent
Source§fn eq(&self, other: &AssistantEvent) -> bool
fn eq(&self, other: &AssistantEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AssistantEvent
impl Serialize for AssistantEvent
impl StructuralPartialEq for AssistantEvent
Auto Trait Implementations§
impl Freeze for AssistantEvent
impl RefUnwindSafe for AssistantEvent
impl Send for AssistantEvent
impl Sync for AssistantEvent
impl Unpin for AssistantEvent
impl UnsafeUnpin for AssistantEvent
impl UnwindSafe for AssistantEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.