pub enum LlmEvent {
Token(String),
Reasoning(String),
ToolCallChunk(ToolCallChunk),
ToolCall(ToolCall),
Usage(UsageStats),
Done,
Error(String),
}Expand description
Raw events emitted by an LLM Provider.
Variants§
Token(String)
A text fragment.
Reasoning(String)
A reasoning/thinking fragment.
ToolCallChunk(ToolCallChunk)
A tool call fragment emitted during streaming.
ToolCall(ToolCall)
A tool call requested by the model.
Usage(UsageStats)
Usage statistics (usually sent at the end).
Done
The stream has ended.
Error(String)
A provider-level error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LlmEvent
impl RefUnwindSafe for LlmEvent
impl Send for LlmEvent
impl Sync for LlmEvent
impl Unpin for LlmEvent
impl UnsafeUnpin for LlmEvent
impl UnwindSafe for LlmEvent
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