pub struct TaskLearner { /* private fields */ }Expand description
Learns from what a session’s tasks did and writes it through the stores: procedures, error solutions, expertise, failure patterns and the provenance of facts written along the way.
Implementations§
Source§impl TaskLearner
impl TaskLearner
pub fn new(stores: Arc<dyn MemoryStores>) -> Self
Sourcepub fn with_embedder(self, embedder: Arc<dyn Embedder>) -> Self
pub fn with_embedder(self, embedder: Arc<dyn Embedder>) -> Self
Recognizes duplicates and stores trigger embeddings with embedder.
Sourcepub fn with_enhancer(self, enhancer: ProcedureEnhancer) -> Self
pub fn with_enhancer(self, enhancer: ProcedureEnhancer) -> Self
Rewrites procedures into reusable ones with enhancer.
Sourcepub fn with_evidence_gate(self, enforce: bool) -> Self
pub fn with_evidence_gate(self, enforce: bool) -> Self
Keeps only procedures with enough evidence (meets_evidence_gate).
Sourcepub async fn learn(
&self,
trace: &[TraceEvent],
plans: &[CompletedPlan],
) -> LearningReport
pub async fn learn( &self, trace: &[TraceEvent], plans: &[CompletedPlan], ) -> LearningReport
Learn from trace and the session’s finished plans. A row that
cannot be written is logged and skipped.
Auto Trait Implementations§
impl !RefUnwindSafe for TaskLearner
impl !UnwindSafe for TaskLearner
impl Forget for TaskLearner
impl Freeze for TaskLearner
impl Move for TaskLearner
impl Send for TaskLearner
impl Sync for TaskLearner
impl Unpin for TaskLearner
impl UnsafeUnpin for TaskLearner
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 more