feat: 记忆配置改为数据库存储,用户只可配置召回模式
- 新增 persistence/memory_config/ 模块:UserMemoryConfigRow ORM 模型 + SqlUserMemoryConfigRepository + MemoryUserMemoryConfigStore(内存兼容) - 新增 Alembic 迁移脚本 20260521_01 创建 user_memory_configs 表 - memory_config.py:USER_WRITABLE_FIELDS 从 3 个缩减为 1 个 (hindsight.recall_budget),移除文件 IO,改为进程内 cache + async DB 对接函数 - Gateway lifespan 启动时批量预热 recall_budget cache - memory router PATCH/DELETE 改用 DB 存储,支持 400 校验非法 budget 值 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
a8a545690f
commit
d56230e04d
11 files changed
+329
-106
No files matched your search
+2
@@ -16,6 +16,7 @@ there is no matching entity directory.
|
||||
"""
|
||||
|
||||
from deerflow.persistence.agents.model import AgentRow
|
||||
from deerflow.persistence.memory_config.model import UserMemoryConfigRow
|
||||
from deerflow.persistence.feedback.model import FeedbackRow
|
||||
from deerflow.persistence.llm_metrics.model import LlmCallMetricRow
|
||||
from deerflow.persistence.models.run_event import RunEventRow
|
||||
@@ -55,5 +56,6 @@ __all__ = [
|
||||
"ThreadMetaRow",
|
||||
"ThreadShareRow",
|
||||
"ToolCallMetricRow",
|
||||
"UserMemoryConfigRow",
|
||||
"UserRow",
|
||||
]
|
||||
Reference in new issue
Block a user