pub enum StreamEvent {
Token(String),
Thinking(String),
ToolCall {
id: String,
name: String,
arguments_json: String,
},
}Expand description
Events emitted during a streaming LLM response.
Separates thinking content from regular content, with a streaming
flag, so a caller can render reasoning and output as distinct channels.
Variants§
Token(String)
A token/chunk of content from the LLM.
Thinking(String)
Thinking/reasoning content (for thinking-capable models like
DeepSeek-R1, QwQ, Qwen3, etc.).
ToolCall
The LLM invoked a workspace tool (function call).
Trait Implementations§
Source§impl Clone for StreamEvent
impl Clone for StreamEvent
Auto Trait Implementations§
impl Freeze for StreamEvent
impl RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin for StreamEvent
impl UnsafeUnpin 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