pub enum LlmStreamEvent {
TextDelta(String),
ThinkingDelta(String),
ThinkingSignature(String),
ReasonItem {
provider: String,
model: Option<String>,
item_id: String,
encrypted_content: Option<String>,
summary: Vec<String>,
token_count: Option<u32>,
},
ToolCalls(Vec<ToolCall>),
Done(Box<LlmCompletionMetadata>),
Error(LlmStreamError),
}Expand description
Events emitted during LLM streaming
Variants§
TextDelta(String)
Text delta (incremental content)
ThinkingDelta(String)
Thinking delta (incremental reasoning content from extended thinking models)
ThinkingSignature(String)
Cryptographic signature for thinking content (Anthropic Claude) Emitted when a thinking block completes, before the Done event
ReasonItem
Opaque assistant reasoning response item (OpenAI Responses). Carries provider-supplied opaque/encrypted reasoning artifacts plus safe summary text and per-item metadata. Plaintext hidden reasoning content is intentionally excluded so callers can persist this without exposing chain-of-thought.
Fields
ToolCalls(Vec<ToolCall>)
Tool calls from the LLM
Done(Box<LlmCompletionMetadata>)
Streaming completed
Error(LlmStreamError)
Error during streaming
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request