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 TaskLearnerwhere
*const ArcInner<dyn MemoryStores> is !null: Freeze,
PhantomData<ArcInner<dyn MemoryStores>>: Freeze,
*const ArcInner<dyn Embedder> is !null: Freeze,
PhantomData<ArcInner<dyn Embedder>>: Freeze,
*const ArcInner<dyn Provider> is !null: Freeze,
PhantomData<ArcInner<dyn Provider>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
impl Move for TaskLearner
impl Send for TaskLearner
impl Sync for TaskLearner
impl Unpin for TaskLearner
impl UnsafeUnpin for TaskLearnerwhere
*const ArcInner<dyn MemoryStores> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn MemoryStores>>: UnsafeUnpin,
*const ArcInner<dyn Embedder> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Embedder>>: UnsafeUnpin,
*const ArcInner<dyn Provider> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Provider>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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