添加公共工具:联网搜索(DuckDuckGo)和可视化图表(Mermaid)
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 10m38s

This commit is contained in:
2026-04-29 23:10:15 +08:00
parent 492f5c1131
commit 4fe6b68819
6 changed files with 453 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
"""
工具定义模块 - 子图工具 + RAG 工具
Subgraph Tools + RAG Tools
工具定义模块 - 子图工具 + RAG 工具 + 公共工具
Subgraph Tools + RAG Tools + Common Tools
"""
# 子图工具
@@ -12,6 +12,14 @@ from .subgraph_tools import (
contact_tool
)
# 公共工具
from .common_tools import (
COMMON_TOOLS,
COMMON_TOOLS_BY_NAME,
web_search_tool,
generate_chart_tool
)
# 工具列表和映射(全局常量)
AVAILABLE_TOOLS = SUBGRAPH_TOOLS.copy()
TOOLS_BY_NAME = SUBGRAPH_TOOLS_BY_NAME.copy()
AVAILABLE_TOOLS = SUBGRAPH_TOOLS.copy() + COMMON_TOOLS.copy()
TOOLS_BY_NAME = {**SUBGRAPH_TOOLS_BY_NAME, **COMMON_TOOLS_BY_NAME}