Expand description
Conversation memory — store and retrieve message history per session.
The Memory trait defines async operations for loading, saving, and
appending messages. InMemoryStore keeps everything in a
parking_lot::RwLock<HashMap>, while SlidingWindowMemory wraps any
Memory and trims to a maximum message count.
Structs§
- InMemory
Store - A simple in-process memory store backed by a
RwLock<HashMap>. - Sliding
Window Memory - Wraps any
Memoryand limits the stored history to the lastmax_messagesnon-system entries (always preserving a leading system message in addition to that limit).
Traits§
- Memory
- Async conversation memory backend.