pub struct FullRecall { /* private fields */ }Expand description
Recall over the memory stores for one turn. It already knows the channel,
role and memory policy, so the Recall contract’s session and query are
enough.
Implementations§
Source§impl FullRecall
impl FullRecall
pub fn new( source: Arc<RecallSource>, host: Arc<dyn RecallHost>, turn: RecallTurn, ) -> Self
Sourcepub fn adopt(self, speculative: SpeculativeRecall) -> Self
pub fn adopt(self, speculative: SpeculativeRecall) -> Self
This turn’s recall takes over speculative’s render; its writes
are made, as this turn’s, when the block is taken.
Sourcepub fn prefetch(self) -> Self
pub fn prefetch(self) -> Self
Starts rendering the turn’s memory block now, so the first model call finds it ready instead of waiting for every lookup. Only a turn that names its request can: the block is rendered for that text, whatever query the model call later passes. Outside a Tokio runtime nothing starts and the block renders on demand as before.
Sourcepub async fn render_block(&self, query: &str) -> String
pub async fn render_block(&self, query: &str) -> String
The memory block: critical facts, core profile, then the query-ranked
memory sections. Channel, role and policy scoping are applied here.
query is the request’s latest user message, used when the turn
gives no user text.
Trait Implementations§
Source§impl Drop for FullRecall
impl Drop for FullRecall
Source§impl Recall for FullRecall
impl Recall for FullRecall
Source§fn recall<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
query: &'life2 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn recall<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
query: &'life2 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Channel-scoped fact lines, for generic callers.
Source§fn render<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
query: &'life2 str,
_limit: usize,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn render<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
query: &'life2 str,
_limit: usize,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The full memory block with its section headings.
Auto Trait Implementations§
impl !Freeze for FullRecall
impl !RefUnwindSafe for FullRecall
impl !UnwindSafe for FullRecall
impl Forget for FullRecall
impl Move for FullRecall
impl Send for FullRecall
impl Sync for FullRecall
impl Unpin for FullRecall
impl UnsafeUnpin for FullRecallwhere
*const ArcInner<RecallSource> is !null: UnsafeUnpin,
PhantomData<ArcInner<RecallSource>>: UnsafeUnpin,
*const ArcInner<dyn RecallHost> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn RecallHost>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const Header is !null: UnsafeUnpin,
PhantomData<(String, Vec<RecallEffect>)>: UnsafeUnpin,
*const ArcInner<Mutex<Vec<RecallEffect>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Vec<RecallEffect>>>>: 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
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> ⓘ
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> ⓘ
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