Files
Bubbles/agent/tools/__init__.py
zihanjian 005ec4f473 refactor: 移除 Perplexity 相关功能并重构搜索工具
重构 WebSearch 工具使用 Tavily 替代 Perplexity
移除 Perplexity 相关代码、配置和依赖
简化配置文件和工具注册逻辑
2026-02-25 13:11:32 +08:00

28 lines
827 B
Python

# agent/tools/__init__.py
from .base import Tool
from .registry import ToolRegistry
from .web_search import WebSearchTool
from .reminder import ReminderCreateTool, ReminderListTool, ReminderDeleteTool
from .chat_history import ChatHistoryTool
__all__ = [
"Tool",
"ToolRegistry",
"WebSearchTool",
"ReminderCreateTool",
"ReminderListTool",
"ReminderDeleteTool",
"ChatHistoryTool",
]
def create_default_registry(tavily_api_key: str | None = None) -> ToolRegistry:
"""创建包含所有默认工具的注册表"""
registry = ToolRegistry()
registry.register(WebSearchTool(api_key=tavily_api_key))
registry.register(ReminderCreateTool())
registry.register(ReminderListTool())
registry.register(ReminderDeleteTool())
registry.register(ChatHistoryTool())
return registry