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