feat: 长期记忆改为摘要检索并由模型按需载入

This commit is contained in:
2026-09-20 11:33:35 +08:00
parent 177036cf3d
commit 9b240b35a9
12 changed files with 300 additions and 52 deletions
+2 -1
View File
@@ -79,12 +79,13 @@ class ChatMessage:
@dataclass
class UserMemory:
"""用户级长期记忆条目。"""
"""用户级长期记忆条目;summary 供检索,text 仅按需载入。"""
company_id: int
user_id: str
kind: MemoryKind
text: str
summary: str = ""
key: str | None = None
value: dict[str, Any] = field(default_factory=dict)
source_thread_id: str | None = None