Expand description
Conversation management for context window handling.
This module provides utilities for managing long-running conversations, including automatic summarization and token management.
§Overview
- ManagedConversation: Tracks messages and provides utilities
- CompactingConversation: Auto-summarizes when approaching limits
- ConversationConfig: Configuration for behavior
§Example
use liteforge::conversation::{ManagedConversation, ConversationConfig};
use liteforge::Message;
let mut conv = ManagedConversation::new();
conv.add_user_message("Hello!");
conv.add_assistant_message("Hi! How can I help?");
let messages = conv.messages();Structs§
- Compacting
Conversation - A conversation that automatically compacts when approaching token limits.
- Conversation
Config - Configuration for conversation management.
- Managed
Conversation - A managed conversation that tracks messages and their metadata.
Enums§
- Summarization
Strategy - Strategy for summarizing conversations.