pub enum AskEvent {
ModelDownloadStart {
role: ModelRole,
repo_id: String,
filename: String,
},
ModelDownloadComplete {
role: ModelRole,
elapsed_ms: u64,
},
StageStarted {
stage: SearchStage,
},
StageFinished {
stage: SearchStage,
elapsed_ms: u64,
},
Hits {
hits: Vec<SearchHit>,
},
Token {
delta: String,
},
AnswerComplete {
answer: Answer,
stats: AskStats,
},
}Expand description
Streaming events emitted by the ask pipeline, in order.
The stream ends after AnswerComplete or when the underlying future returns Err.
Variants§
ModelDownloadStart
A model file needs downloading from the model hub (not yet cached). Emitted as the first events of a lazy ask stream.
Fields
ModelDownloadComplete
A model file download finished.
Fields
StageStarted
A pipeline stage started — for progress display.
Fields
§
stage: SearchStageStageFinished
A pipeline stage finished — carries the stage duration.
Hits
Retrieval finished: the context set that grounds the answer.
Token
A streamed piece of LLM output (one token or a multi-token delta).
AnswerComplete
Terminal event: the full answer with citations, plus timings.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AskEvent
impl<'de> Deserialize<'de> for AskEvent
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 AskEvent
impl RefUnwindSafe for AskEvent
impl Send for AskEvent
impl Sync for AskEvent
impl Unpin for AskEvent
impl UnsafeUnpin for AskEvent
impl UnwindSafe for AskEvent
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