pub struct ErrorKnowledgeBase { /* private fields */ }Expand description
Local Error Knowledge Base (RAG system)
Implementations§
Source§impl ErrorKnowledgeBase
impl ErrorKnowledgeBase
Sourcepub fn record(&mut self, error: ErrorRecord)
pub fn record(&mut self, error: ErrorRecord)
Record an error
Sourcepub fn find_similar(
&self,
error_type: &str,
keywords: &[&str],
) -> Vec<ErrorRecord>
pub fn find_similar( &self, error_type: &str, keywords: &[&str], ) -> Vec<ErrorRecord>
Find similar errors (for learning from past mistakes)
Sourcepub fn find_by_tag(&self, tag: &str) -> Vec<ErrorRecord>
pub fn find_by_tag(&self, tag: &str) -> Vec<ErrorRecord>
Get errors by tag
Sourcepub fn unresolved(&self) -> Vec<ErrorRecord>
pub fn unresolved(&self) -> Vec<ErrorRecord>
Get all unresolved errors
Sourcepub fn most_frequent(&self, limit: usize) -> Vec<ErrorRecord>
pub fn most_frequent(&self, limit: usize) -> Vec<ErrorRecord>
Get most frequent errors
Sourcepub fn export_json(&self) -> Result<String>
pub fn export_json(&self) -> Result<String>
Export to JSON for documentation/learning
Sourcepub fn stats(&self) -> ErrorStats
pub fn stats(&self) -> ErrorStats
Get statistics about errors
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorKnowledgeBase
impl RefUnwindSafe for ErrorKnowledgeBase
impl Send for ErrorKnowledgeBase
impl Sync for ErrorKnowledgeBase
impl Unpin for ErrorKnowledgeBase
impl UnwindSafe for ErrorKnowledgeBase
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