pub trait MemoryRetriever: Send + Sync {
// Required method
fn retrieve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
storage: &'life1 dyn MemoryStorage,
model: &'life2 dyn Model,
request: &'life3 RetrievalRequest,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Which memories this turn should see.
Required Methods§
Sourcefn retrieve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
storage: &'life1 dyn MemoryStorage,
model: &'life2 dyn Model,
request: &'life3 RetrievalRequest,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn retrieve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
storage: &'life1 dyn MemoryStorage,
model: &'life2 dyn Model,
request: &'life3 RetrievalRequest,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Returns memory names, best first. Names rather than whole memories because the caller re-reads them from storage anyway, and a retriever backed by an index has no reason to carry the bodies around.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".