pub struct ClassificationResult {
pub need: RetrievalNeed,
pub confidence: f32,
pub used_local_llm: bool,
pub intent: Option<String>,
}Expand description
Result of classification with confidence
Fields§
§need: RetrievalNeedThe classified retrieval need
confidence: f32Confidence score (0.0 - 1.0)
used_local_llm: boolWhether LLM was used
intent: Option<String>Detected intent (if LLM was used)
Implementations§
Source§impl ClassificationResult
impl ClassificationResult
Sourcepub fn from_local(
need: RetrievalNeed,
confidence: f32,
intent: Option<String>,
) -> Self
pub fn from_local( need: RetrievalNeed, confidence: f32, intent: Option<String>, ) -> Self
Create a result from LLM classification
Sourcepub fn from_fallback(need: RetrievalNeed, confidence: f32) -> Self
pub fn from_fallback(need: RetrievalNeed, confidence: f32) -> Self
Create a result from pattern-based fallback
Trait Implementations§
Source§impl Clone for ClassificationResult
impl Clone for ClassificationResult
Source§fn clone(&self) -> ClassificationResult
fn clone(&self) -> ClassificationResult
Returns a duplicate of the value. Read more
1.0.0 · 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 ClassificationResult
impl RefUnwindSafe for ClassificationResult
impl Send for ClassificationResult
impl Sync for ClassificationResult
impl Unpin for ClassificationResult
impl UnsafeUnpin for ClassificationResult
impl UnwindSafe for ClassificationResult
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