feat(memory): 添加记忆系统模块

This commit is contained in:
徐涛
2026-06-08 08:42:43 +08:00
parent 1fe7f02281
commit 2ecc0b4001
9 changed files with 1244 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
//! 记忆系统 —— 对话消息管理、知识页面存储与关键词检索。
pub mod conversation;
pub mod error;
pub mod knowledge;
pub mod retriever;
pub mod store;
pub mod types;
// 高频类型(大多数下游需要)
pub use conversation::{ConversationMemory, ConversationMemoryConfig};
pub use error::MemoryError;
pub use knowledge::KnowledgeStore;
pub use retriever::MemoryRetriever;
pub use store::{InMemoryStore, MemoryStore};
// 低频类型(配置/高级使用)
pub use conversation::MemoryStrategy;
pub use knowledge::{PageIndexEntry, KNOWLEDGE_PREFIX};
pub use retriever::{RetrieverConfig, RetrievalResult, ScoredItem};
pub use store::{EvictionConfig, EvictionPolicy};
pub use types::{KnowledgePage, MemoryFilter, MemoryItem};