pub struct MemoryWriter { /* private fields */ }Expand description
Hook that writes the final assistant text of every successful run back into long-term memory.
Behaviour:
- On every
PostModel, capturesout.textinto an internal slot. - On
TaskCompleted, takes the most recent captured text and writes it as aMemoryEntrytagged with the source (defaults to"session"). - On
SessionEndwithout aTaskCompleted(i.e.BudgetExhausted), nothing is written — partial work shouldn’t pollute long-term memory.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MemoryWriter
impl !RefUnwindSafe for MemoryWriter
impl Send for MemoryWriter
impl Sync for MemoryWriter
impl Unpin for MemoryWriter
impl UnsafeUnpin for MemoryWriter
impl !UnwindSafe for MemoryWriter
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