1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// src/memory/mod.rs
//! Memory system for conversation history management.
//!
//! Provides conversation memory management functionality.
//!
//! # Core Concepts
//!
//! - **BaseMemory**: Base trait for memory.
//! - **ConversationBufferMemory**: Simple conversation buffer.
//! - **ConversationBufferWindowMemory**: Conversation buffer with window.
//!
//! # Example
//!
//! ```ignore
//! use langchainrust::{ConversationBufferMemory, BaseMemory};
//! use std::collections::HashMap;
//!
//! let mut memory = ConversationBufferMemory::new();
//!
//! // Save conversation
//! let inputs = HashMap::from([("input".to_string(), "Hello".to_string())]);
//! let outputs = HashMap::from([("output".to_string(), "Hi!".to_string())]);
//! memory.save_context(&inputs, &outputs).await?;
//!
//! // Load memory
//! let vars = memory.load_memory_variables(&HashMap::new()).await?;
//! println!("{:?}", vars.get("history"));
//! ```
pub use ;
pub use ConversationBufferMemory;
pub use ConversationBufferWindowMemory;
pub use ConversationSummaryMemory;
pub use ConversationSummaryBufferMemory;