Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into xhy
This commit is contained in:
commit
e2d61f4cfb
476 files changed
+103681
-9379
No files matched your search
@@ -6,7 +6,7 @@ from deerflow.config import get_app_config
|
||||
from deerflow.config.app_config import AppConfig
|
||||
from deerflow.reflection import resolve_variable
|
||||
from deerflow.sandbox.security import is_host_bash_allowed
|
||||
from deerflow.tools.builtins import ask_clarification_tool, fast_chat_tool, fast_llm_answer, present_file_tool, scheduled_task_tool, task_tool, view_image_tool
|
||||
from deerflow.tools.builtins import ask_clarification_tool, memory_tool, present_file_tool, scheduled_task_tool, task_tool, view_image_tool
|
||||
from deerflow.tools.builtins.tool_search import reset_deferred_registry
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -86,6 +86,25 @@ def get_available_tools(
|
||||
builtin_tools = BUILTIN_TOOLS.copy()
|
||||
if not is_scheduled_run:
|
||||
builtin_tools.append(scheduled_task_tool)
|
||||
|
||||
# Memory V2:记忆与 builtin provider 都启用时,暴露 memory 工具给 LLM 主动写入
|
||||
memory_config = getattr(config, "memory", None)
|
||||
if memory_config is not None and getattr(memory_config, "enabled", False):
|
||||
builtin_config = getattr(memory_config, "builtin", None)
|
||||
if builtin_config is not None and getattr(builtin_config, "enabled", False):
|
||||
builtin_tools.append(memory_tool)
|
||||
logger.info("Including memory tool (Memory V2 builtin provider enabled)")
|
||||
|
||||
# Hindsight 在 tools / hybrid 模式下,额外暴露 3 个 Hindsight 工具
|
||||
if getattr(memory_config, "provider", "builtin") == "hindsight":
|
||||
hindsight_config = getattr(memory_config, "hindsight", None)
|
||||
memory_mode = getattr(hindsight_config, "memory_mode", "context") if hindsight_config else "context"
|
||||
if memory_mode in ("tools", "hybrid"):
|
||||
from deerflow.tools.builtins.hindsight_tools import HINDSIGHT_TOOLS
|
||||
|
||||
builtin_tools.extend(HINDSIGHT_TOOLS)
|
||||
logger.info("Including Hindsight tools (memory_mode=%s)", memory_mode)
|
||||
skill_evolution_config = getattr(config, "skill_evolution", None)
|
||||
# skill_list / skill_view 是只读工具(发现、查看技能),与"自我进化"写能力无关,
|
||||
# 始终提供给 agent。
|
||||
from deerflow.tools.builtins.skill_tools import skill_list_tool, skill_view_tool
|
||||
|
||||
Reference in new issue
Block a user