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>),
MessagePhase(ExecutionPhase),
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
MessagePhase(ExecutionPhase)
Provider-native execution phase for the current assistant message, surfaced mid-stream before completion (EVE-774).
Only emitted by providers whose stream carries a native phase ahead of
the terminal Done metadata (OpenAI Responses exposes it on
response.output_item.added). Consumers use it as a best-effort hint to
classify streamed assistant text as commentary vs final answer; the
authoritative value is still the completed Message.phase. Other
providers never emit this and stay unclassified until completion.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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>
T in a tonic::Request