pub enum LlmStreamEvent {
ContentChunk(String),
Reasoning(String),
ToolCallChunk {
id: String,
name: Option<String>,
arguments: String,
},
ToolCall(ToolCall),
Usage(TokenUsage),
}Expand description
An event emitted during a streaming LLM response.
Variants§
ContentChunk(String)
Reasoning(String)
A chunk of reasoning-model “thinking” text, distinct from the answer
content (e.g. OpenRouter’s reasoning / Zhipu’s reasoning_content).
ToolCallChunk
ToolCall(ToolCall)
Usage(TokenUsage)
What the request cost, as reported by the provider. Terminal: it arrives
in the final chunk, after the content. Absent on endpoints that do not
report usage while streaming — see OpenAiConfig::stream_usage.
Trait Implementations§
Source§impl Clone for LlmStreamEvent
impl Clone for LlmStreamEvent
Source§fn clone(&self) -> LlmStreamEvent
fn clone(&self) -> LlmStreamEvent
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 LlmStreamEvent
impl RefUnwindSafe for LlmStreamEvent
impl Send for LlmStreamEvent
impl Sync for LlmStreamEvent
impl Unpin for LlmStreamEvent
impl UnsafeUnpin for LlmStreamEvent
impl UnwindSafe for LlmStreamEvent
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