pub struct QualityScorer { /* private fields */ }Expand description
Engine for scoring memory quality
Implementations§
Source§impl QualityScorer
impl QualityScorer
Sourcepub fn new(config: QualityScorerConfig) -> Self
pub fn new(config: QualityScorerConfig) -> Self
Create a new quality scorer
Sourcepub fn score(&self, memory: &Memory, connection_count: usize) -> QualityScore
pub fn score(&self, memory: &Memory, connection_count: usize) -> QualityScore
Score a memory’s quality
Sourcepub fn score_batch(&self, memories: &[Memory]) -> Vec<(Memory, QualityScore)>
pub fn score_batch(&self, memories: &[Memory]) -> Vec<(Memory, QualityScore)>
Score multiple memories and return sorted by quality
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QualityScorer
impl RefUnwindSafe for QualityScorer
impl Send for QualityScorer
impl Sync for QualityScorer
impl Unpin for QualityScorer
impl UnsafeUnpin for QualityScorer
impl UnwindSafe for QualityScorer
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
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.