pub struct GraphAwareLongTermBuilder { /* private fields */ }Expand description
Builder facade for GraphAwareLongTerm — defaults the extractor
and metrics for the common case so callers only supply the two
mandatory backends (vector + graph).
Implementations§
Source§impl GraphAwareLongTermBuilder
impl GraphAwareLongTermBuilder
Sourcepub fn extractor(self, extractor: Arc<dyn EntityExtractor>) -> Self
pub fn extractor(self, extractor: Arc<dyn EntityExtractor>) -> Self
Override the default BuiltinExtractor. Use a
crate::FallbackExtractor or crate::LlmEntityExtractor for
richer extraction.
Sourcepub fn metrics(self, metrics: Arc<RecallMetrics>) -> Self
pub fn metrics(self, metrics: Arc<RecallMetrics>) -> Self
Supply a shared RecallMetrics when the caller wants to read
metrics.snapshot() from an ops/metrics endpoint. Without this,
the builder allocates a fresh counter the caller cannot observe.
Sourcepub fn min_graph_hits(self, n: usize) -> Self
pub fn min_graph_hits(self, n: usize) -> Self
Override the minimum candidate count required to take the graph
path. Default 1 (any graph hit wins).
Sourcepub fn build(
self,
vector: Arc<dyn FilterableLongTermMemory>,
graph: Arc<dyn KnowledgeGraph>,
) -> GraphAwareLongTerm
pub fn build( self, vector: Arc<dyn FilterableLongTermMemory>, graph: Arc<dyn KnowledgeGraph>, ) -> GraphAwareLongTerm
Build the composer. vector is the authoritative store; graph
is the best-effort recall index. Defaults fill in any setter
that was not called.
Trait Implementations§
Source§impl Default for GraphAwareLongTermBuilder
impl Default for GraphAwareLongTermBuilder
Source§fn default() -> GraphAwareLongTermBuilder
fn default() -> GraphAwareLongTermBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for GraphAwareLongTermBuilder
impl !UnwindSafe for GraphAwareLongTermBuilder
impl Freeze for GraphAwareLongTermBuilder
impl Send for GraphAwareLongTermBuilder
impl Sync for GraphAwareLongTermBuilder
impl Unpin for GraphAwareLongTermBuilder
impl UnsafeUnpin for GraphAwareLongTermBuilder
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