sync update from LAN repo (source ji @ 85078a31)
This commit is contained in:
1 parent
5d6627af50
commit
e602d88695
864 files changed
+99150
-6346
No files matched your search
@@ -135,8 +135,14 @@ def get_available_tools(
|
||||
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):
|
||||
memory_config = getattr(config, "memory", None)
|
||||
try:
|
||||
from deerflow.config.system_settings import get_memory_runtime_settings
|
||||
|
||||
memory_runtime_enabled = get_memory_runtime_settings().enabled
|
||||
except Exception: # noqa: BLE001 - settings failure must keep memory off
|
||||
memory_runtime_enabled = False
|
||||
if memory_runtime_enabled and memory_config is not None:
|
||||
builtin_config = getattr(memory_config, "builtin", None)
|
||||
if builtin_config is not None and getattr(builtin_config, "enabled", False):
|
||||
builtin_tools.append(memory_tool)
|
||||
@@ -177,12 +183,14 @@ def get_available_tools(
|
||||
|
||||
builtin_tools.append(read_peer_delivery_tool)
|
||||
|
||||
# Conditional LLMWiki mode: the tool is absent when no effective WeKnora
|
||||
# address is configured, keeping legacy deployments behavior-identical.
|
||||
# Unified selected-space retrieval is available for local Wiki snapshots,
|
||||
# WeKnora, or the assistant Wiki repository.
|
||||
try:
|
||||
from deerflow.integrations.weknora.runtime import get_resolved_llmwiki_runtime
|
||||
from deerflow.persistence.assistant_knowledge import get_assistant_knowledge_store
|
||||
|
||||
if get_resolved_llmwiki_runtime(config).weknora_enabled:
|
||||
local_wiki = getattr(getattr(config.llmwiki, "local_wiki_index", None), "enabled", False)
|
||||
if get_resolved_llmwiki_runtime(config).weknora_enabled or local_wiki or get_assistant_knowledge_store() is not None:
|
||||
from deerflow.tools.builtins.llmwiki_search_tool import llmwiki_search_tool
|
||||
|
||||
builtin_tools.append(llmwiki_search_tool)
|
||||
|
||||
Reference in new issue
Block a user