pub enum LcelStreamEvent {
OnLlmStart {
run_id: Uuid,
name: String,
metadata: HashMap<String, Value>,
},
OnLlmStream {
run_id: Uuid,
name: String,
token: String,
},
OnLlmEnd {
run_id: Uuid,
name: String,
output: Value,
},
OnToolEnd {
run_id: Uuid,
name: String,
output: String,
},
OnChainEnd {
run_id: Uuid,
name: String,
output: Value,
},
}Expand description
Fine-grained event emitted during LCEL pipeline execution.
v0.9.0 supports 5 core event types:
OnLlmStart/OnLlmStream/OnLlmEnd: LLM lifecycleOnToolEnd: Tool execution completionOnChainEnd: Chain execution completion
v0.10.0 will add: OnRetrieverStart/End, OnPromptStart/End, OnToolStart, OnChainStart, OnToolError, OnChainError, etc.
Note: Named LcelStreamEvent to avoid collision with
lc_langgraph::StreamEvent (graph execution events).
Variants§
OnLlmStart
LLM invocation started.
Fields
OnLlmStream
LLM streaming token.
Fields
OnLlmEnd
LLM invocation completed.
Fields
OnToolEnd
Tool execution completed.
Fields
OnChainEnd
Chain execution completed.
Implementations§
Trait Implementations§
Source§impl Clone for LcelStreamEvent
impl Clone for LcelStreamEvent
Source§fn clone(&self) -> LcelStreamEvent
fn clone(&self) -> LcelStreamEvent
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 moreAuto Trait Implementations§
impl Freeze for LcelStreamEvent
impl RefUnwindSafe for LcelStreamEvent
impl Send for LcelStreamEvent
impl Sync for LcelStreamEvent
impl Unpin for LcelStreamEvent
impl UnsafeUnpin for LcelStreamEvent
impl UnwindSafe for LcelStreamEvent
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