pub struct RecallSessions { /* private fields */ }Expand description
The archive, read as memory: the closest earlier sessions for this prompt, injected before the model’s first request rather than left for it to ask for.
This is the half of session_search that Hermes has and Eclipse did not. A tool the model
may call only helps a model that suspects it should; the point of a memory is that the
agent knows the fact before it answers. It is computed — full-text queries over the same
store the agent is already writing, no model call — bounded by budget_chars and
results, and it fires at on_completion_call only when the newest message is the user’s,
which is once per prompt and never again for that prompt’s tool round-trips.
Implementations§
Source§impl RecallSessions
impl RecallSessions
pub fn new( store: SessionStore, settings: RecallSettings, reporting: Reporting, ) -> Self
Trait Implementations§
Source§impl LoopHook for RecallSessions
impl LoopHook for RecallSessions
fn on_completion_call<'life0, 'life1, 'async_trait>(
&'life0 self,
ev: CallEvent<'life1>,
) -> Pin<Box<dyn Future<Output = CallAction> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_run_start<'life0, 'life1, 'async_trait>(
&'life0 self,
_ev: RunStart<'life1>,
) -> Pin<Box<dyn Future<Output = RunStartAction> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_model_turn_finished<'life0, 'life1, 'async_trait>(
&'life0 self,
_ev: Turn<'life1>,
) -> Pin<Box<dyn Future<Output = TurnAction> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_dispatch<'life0, 'life1, 'async_trait>(
&'life0 self,
_ev: Dispatch<'life1>,
) -> Pin<Box<dyn Future<Output = DispatchAction> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_outcome<'life0, 'life1, 'async_trait>(
&'life0 self,
_ev: Outcome<'life1>,
) -> Pin<Box<dyn Future<Output = OutcomeAction> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_run_settled<'life0, 'life1, 'async_trait>(
&'life0 self,
_ev: Settled<'life1>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !Freeze for RecallSessions
impl !RefUnwindSafe for RecallSessions
impl !UnwindSafe for RecallSessions
impl Forget for RecallSessions
impl Move for RecallSessions
impl Send for RecallSessions
impl Sync for RecallSessions
impl Unpin for RecallSessions
impl UnsafeUnpin for RecallSessionswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Mutex<Option<Db>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Option<Db>>>>: UnsafeUnpin,
*const ArcInner<dyn Fn(&str) + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(&str) + Sync + Send>>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
PhantomData<(String, ())>: 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