pub enum AgentStreamEvent {
Show 15 variants
RunStart {
run_id: String,
},
ContextInfo {
estimated_tokens: usize,
request_bytes: usize,
context_limit: Option<u64>,
},
ContextCompressed {
original_tokens: usize,
compressed_tokens: usize,
strategy: String,
messages_before: usize,
messages_after: usize,
},
RequestStart {
step: u32,
},
TextDelta {
text: String,
},
ToolCallStart {
tool_name: String,
tool_call_id: Option<String>,
},
ToolCallDelta {
delta: String,
tool_call_id: Option<String>,
},
ToolCallComplete {
tool_name: String,
tool_call_id: Option<String>,
},
ToolExecuted {
tool_name: String,
tool_call_id: Option<String>,
success: bool,
error: Option<String>,
},
ThinkingDelta {
text: String,
},
ResponseComplete {
step: u32,
},
OutputReady,
RunComplete {
run_id: String,
},
Error {
message: String,
},
Cancelled {
partial_text: Option<String>,
partial_thinking: Option<String>,
pending_tools: Vec<String>,
},
}Expand description
Events emitted during streaming.
Variants§
RunStart
Run started.
ContextInfo
Context size information (emitted before each model request).
Fields
ContextCompressed
Context was compressed to fit within limits.
Fields
RequestStart
Model request started.
TextDelta
Text delta.
ToolCallStart
Tool call started.
ToolCallDelta
Tool call arguments delta.
ToolCallComplete
Tool call completed (arguments fully received).
ToolExecuted
Tool executed.
ThinkingDelta
Thinking delta (for reasoning models).
ResponseComplete
Model response completed.
OutputReady
Output ready.
RunComplete
Run completed.
Error
Error occurred.
Cancelled
Run was cancelled.
Trait Implementations§
Source§impl Clone for AgentStreamEvent
impl Clone for AgentStreamEvent
Source§fn clone(&self) -> AgentStreamEvent
fn clone(&self) -> AgentStreamEvent
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 AgentStreamEvent
impl RefUnwindSafe for AgentStreamEvent
impl Send for AgentStreamEvent
impl Sync for AgentStreamEvent
impl Unpin for AgentStreamEvent
impl UnwindSafe for AgentStreamEvent
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