pub enum StreamEvent {
InitStream {
run_id: String,
conversation_id: String,
timestamp: i64,
},
Reasoning {
content: String,
},
Message {
content: String,
},
ToolCall {
index: u32,
id: Option<String>,
name: Option<String>,
arguments: Option<String>,
},
ToolResult {
tool_call_id: String,
result: String,
is_error: bool,
duration_ms: u64,
},
Done {
finish_reason: Option<String>,
},
Error {
message: String,
node_id: Option<String>,
},
EndStream {
status: String,
total_duration_ms: u64,
},
}Expand description
Unified StreamEvent for Graph orchestration
Includes both LLM streaming events and Graph-specific orchestration events. This is the canonical event type used throughout the Graph execution.
Variants§
InitStream
Graph execution started
Reasoning
Internal reasoning from LLM (streamed token-by-token)
Message
Response message from LLM (streamed token-by-token)
ToolCall
LLM decided to call a tool (streamed incrementally)
ToolResult
Tool execution completed
Done
LLM streaming completed
Error
Fatal error occurred
EndStream
Graph execution completed
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 moreSource§impl Debug for StreamEvent
impl Debug for StreamEvent
Source§impl<'de> Deserialize<'de> for StreamEvent
impl<'de> Deserialize<'de> for StreamEvent
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 From<StreamEvent> for StreamEvent
Automatic conversion from LLM StreamEvent to Graph StreamEvent
impl From<StreamEvent> for StreamEvent
Automatic conversion from LLM StreamEvent to Graph StreamEvent
Source§fn from(event: StreamEvent) -> Self
fn from(event: StreamEvent) -> Self
Converts to this type from the input type.
Source§impl Serialize for StreamEvent
impl Serialize for StreamEvent
Source§impl StreamEventExtractor for StreamEvent
Implementation of StreamEventExtractor for praxis-persist compatibility
impl StreamEventExtractor for StreamEvent
Implementation of StreamEventExtractor for praxis-persist compatibility
fn is_reasoning(&self) -> bool
fn is_message(&self) -> bool
fn is_tool_call(&self) -> bool
fn reasoning_content(&self) -> Option<&str>
fn message_content(&self) -> Option<&str>
fn tool_call_info( &self, ) -> Option<(u32, Option<&str>, Option<&str>, Option<&str>)>
Auto Trait Implementations§
impl Freeze for StreamEvent
impl RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin 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