This commit is contained in:
wghe committed 2026-05-21 18:29:55 +08:00
1 parent a514b2fe79
commit 87eff3e133
1 file changed
+18 -16
+18 -16
View File
@@ -144,25 +144,27 @@ checkpointer:
# users/{user_id}/memory_config.json > .deer-flow/memory_user_overrides.json > 此处 # users/{user_id}/memory_config.json > .deer-flow/memory_user_overrides.json > 此处
memory: memory:
enabled: true enabled: true
provider: hindsight # 'builtin' | 'hindsight'(外部 provider 名) provider:
# builtin 始终启用,这里只决定 external 选哪个 hindsight # 'builtin' | 'hindsight'(外部 provider 名)
# builtin 始终启用,这里只决定 external 选哪个
builtin: builtin:
enabled: true enabled: true
memory_char_limit: 2200 memory_char_limit: 2200
user_char_limit: 1375 user_char_limit: 1375
deduplicate_on_load: true deduplicate_on_load: true
hindsight: # provider=hindsight 时生效,需另行部署 Hindsight 服务 hindsight: # provider=hindsight 时生效,需另行部署 Hindsight 服务
mode: local_external # 'cloud' | 'local_embedded' | 'local_external' mode: local_external # 'cloud' | 'local_embedded' | 'local_external'
api_url: http://localhost:8765 api_url: http://47.88.25.99:18888
api_key: "" # 部署 Hindsight 后填,或改成 $HINDSIGHT_API_KEY 并设同名环境变量 api_key:
# 注意:写成 $VAR 但环境变量未设置会导致配置加载失败 "" # 部署 Hindsight 后填,或改成 $HINDSIGHT_API_KEY 并设同名环境变量
# 注意:写成 $VAR 但环境变量未设置会导致配置加载失败
bank_id_template: "deerflow-user-{user_id}" bank_id_template: "deerflow-user-{user_id}"
work_bank_id_template: "deerflow-work-{user_id}-{agent_id}" work_bank_id_template: "deerflow-work-{user_id}-{agent_id}"
memory_mode: context # 'context' | 'tools' | 'hybrid' memory_mode: context # 'context' | 'tools' | 'hybrid'
bank_mission: "" bank_mission: "你是一个中文记忆助手,负责从对话中提炼和存储重要信息。所有记忆内容必须使用中文记录。"
bank_retain_mission: "" bank_retain_mission: "请从以下对话中提炼重要信息,包括用户的偏好、需求、背景知识和关键事实。所有提炼的内容必须用中文表达。"
recall_budget: mid # 'low' | 'mid' | 'high' recall_budget: mid # 'low' | 'mid' | 'high'
recall_max_tokens: 4096 recall_max_tokens: 4096
recall_max_input_chars: 800 recall_max_input_chars: 800
auto_recall: true auto_recall: true
@@ -188,10 +190,10 @@ memory:
max_tokens: 2000 max_tokens: 2000
include_builtin: true include_builtin: true
include_hindsight: true include_hindsight: true
context_tag: "memory-context" # 包裹 Hindsight recall 的标签名 context_tag: "memory-context" # 包裹 Hindsight recall 的标签名
security: security:
scan_content: true # 注入/外渗模式扫描 scan_content: true # 注入/外渗模式扫描
block_invisible_unicode: true block_invisible_unicode: true
# streaming_scrubber:预留字段,代码尚未实现 —— 待版本支持后取消注释。 # streaming_scrubber:预留字段,代码尚未实现 —— 待版本支持后取消注释。
# streaming_scrubber: true # SSE 流前清洗 <memory-context> # streaming_scrubber: true # SSE 流前清洗 <memory-context>
@@ -200,6 +202,6 @@ memory:
# 注意:这三项必须嵌套在 ai_writing: 段下;写到顶层会被 _ai_writing_config() # 注意:这三项必须嵌套在 ai_writing: 段下;写到顶层会被 _ai_writing_config()
# (app/gateway/routers/ai_writing.py:_ai_writing_config) 直接忽略。 # (app/gateway/routers/ai_writing.py:_ai_writing_config) 直接忽略。
ai_writing: ai_writing:
keyword_model: deepseek-chat # 检索词生成专用模型,留空回退写作主模型 keyword_model: deepseek-chat # 检索词生成专用模型,留空回退写作主模型
rank_model: deepseek-chat # 素材排序专用模型,留空回退写作主模型 rank_model: deepseek-chat # 素材排序专用模型,留空回退写作主模型
max_materials: 50 # 合并去重后的素材总量上限,范围 [1, 100],默认 20 max_materials: 50 # 合并去重后的素材总量上限,范围 [1, 100],默认 20