pub struct DefaultContextStrategy { /* private fields */ }Implementations§
Source§impl DefaultContextStrategy
impl DefaultContextStrategy
pub fn new(max_tokens: usize, llm_client: Arc<dyn ChatClient>) -> Self
pub fn with_templates( max_tokens: usize, llm_client: Arc<dyn ChatClient>, system_prompt_template: String, summarization_template: String, ) -> Self
Trait Implementations§
Source§impl ContextStrategy for DefaultContextStrategy
impl ContextStrategy for DefaultContextStrategy
Source§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,
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
Auto Trait Implementations§
impl Freeze for DefaultContextStrategy
impl !RefUnwindSafe for DefaultContextStrategy
impl Send for DefaultContextStrategy
impl Sync for DefaultContextStrategy
impl Unpin for DefaultContextStrategy
impl !UnwindSafe for DefaultContextStrategy
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