pub trait ContextStrategy: Send + Sync {
// Required method
fn get_context_window<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
persist_client: Arc<dyn PersistenceClient>,
) -> Pin<Box<dyn Future<Output = Result<ContextWindow>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Strategy for building context window from conversation history
Required Methods§
Sourcefn get_context_window<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
persist_client: Arc<dyn PersistenceClient>,
) -> Pin<Box<dyn Future<Output = Result<ContextWindow>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_context_window<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
persist_client: Arc<dyn PersistenceClient>,
) -> Pin<Box<dyn Future<Output = Result<ContextWindow>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get context window for a conversation