Skip to main content

ContextManager

Trait ContextManager 

Source
pub trait ContextManager: Send + Sync {
    // Required methods
    fn manage_context(&self, conversation: &mut Conversation, max_tokens: usize);
    fn strategy_name(&self) -> &str;
}
Expand description

Manages conversation context to stay within token budgets.

Required Methods§

Source

fn manage_context(&self, conversation: &mut Conversation, max_tokens: usize)

Apply context management to keep the conversation within budget.

Source

fn strategy_name(&self) -> &str

Get the strategy name for logging.

Implementors§