__init__.py 735 B

123456789101112131415161718192021222324252627282930
  1. """
  2. find_agent 工具包
  3. 在此注册本 Agent 专属的工具。
  4. """
  5. from __future__ import annotations
  6. from collections.abc import Callable
  7. from typing import Any
  8. from agents.find_agent.tools.douyin_search import douyin_search
  9. from agents.find_agent.tools.qwen_video_analyze import qwen_video_analyze
  10. from supply_agent.tools.registry import ToolRegistry
  11. ALL_TOOLS: list[Callable[..., Any]] = [
  12. douyin_search,
  13. qwen_video_analyze,
  14. ]
  15. __all__ = [
  16. "ALL_TOOLS",
  17. "douyin_search",
  18. "qwen_video_analyze",
  19. "register_all_tools",
  20. ]
  21. def register_all_tools(registry: ToolRegistry) -> ToolRegistry:
  22. """将 find_agent 包内的所有工具注册到 ToolRegistry。"""
  23. return registry.from_decorated(*ALL_TOOLS)