pub enum RagStreamEvent {
RetrievalStarted {
channel_count: usize,
},
ChannelDone {
channel: String,
hits: usize,
latency_ms: u64,
},
GenerationStarted {
context_chunks: usize,
context_tokens: usize,
},
ContentDelta {
delta: String,
},
Citation {
chunk_id: String,
index: usize,
},
Done {
total_latency_ms: u64,
citations: Vec<Citation>,
usage: RagTokenUsage,
},
}Expand description
Events emitted during a streaming RAG operation.
Variants§
RetrievalStarted
Retrieval phase has started.
ChannelDone
A single channel has completed retrieval.
Fields
GenerationStarted
Generation phase has started with the assembled context.
Fields
ContentDelta
A delta of generated content.
Citation
A citation has been identified in the generated content.
Done
Generation is complete.
Trait Implementations§
Source§impl Clone for RagStreamEvent
impl Clone for RagStreamEvent
Source§fn clone(&self) -> RagStreamEvent
fn clone(&self) -> RagStreamEvent
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 moreSource§impl Debug for RagStreamEvent
impl Debug for RagStreamEvent
Source§impl<'de> Deserialize<'de> for RagStreamEvent
impl<'de> Deserialize<'de> for RagStreamEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RagStreamEvent
impl RefUnwindSafe for RagStreamEvent
impl Send for RagStreamEvent
impl Sync for RagStreamEvent
impl Unpin for RagStreamEvent
impl UnsafeUnpin for RagStreamEvent
impl UnwindSafe for RagStreamEvent
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