Thanks to visit codestin.com
Credit goes to docs.rs

Module memory

Module memory 

Source
Expand description

Memory providers for storing and retrieving conversation history Memory module for storing and retrieving conversation history.

This module provides various memory implementations for LLM conversations:

  • SlidingWindowMemory: Simple FIFO memory with size limit
  • EmbeddingMemory: Semantic search using embeddings (future)
  • RAGMemory: Document-based retrieval (future)

Re-exports§

pub use chat_wrapper::ChatWithMemory;
pub use shared_memory::SharedMemory;
pub use sliding_window::SlidingWindowMemory;
pub use sliding_window::TrimStrategy;

Modules§

chat_wrapper
Chat wrapper that adds memory capabilities to any ChatProvider.
cond_macros
shared_memory
sliding_window
Simple sliding window memory implementation.

Structs§

MessageEvent
Event emitted when a message is added to reactive memory

Enums§

MemoryType
Types of memory implementations available
MessageCondition
Conditions for triggering reactive message handlers

Traits§

MemoryProvider
Trait for memory providers that can store and retrieve conversation history.