__init__.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_detail import douyin_detail
  9. from agents.find_agent.tools.douyin_search import douyin_search
  10. from agents.find_agent.tools.hotspot_profile import (
  11. batch_fetch_portraits,
  12. get_account_fans_portrait,
  13. get_content_fans_portrait,
  14. )
  15. from agents.find_agent.tools.qwen_video_analyze import qwen_video_analyze
  16. from supply_agent.tools.registry import ToolRegistry
  17. ALL_TOOLS: list[Callable[..., Any]] = [
  18. douyin_search,
  19. douyin_detail,
  20. get_content_fans_portrait,
  21. get_account_fans_portrait,
  22. batch_fetch_portraits,
  23. qwen_video_analyze,
  24. ]
  25. __all__ = [
  26. "ALL_TOOLS",
  27. "douyin_search",
  28. "douyin_detail",
  29. "get_content_fans_portrait",
  30. "get_account_fans_portrait",
  31. "batch_fetch_portraits",
  32. "qwen_video_analyze",
  33. "register_all_tools",
  34. ]
  35. def register_all_tools(registry: ToolRegistry) -> ToolRegistry:
  36. """将 find_agent 包内的所有工具注册到 ToolRegistry。"""
  37. return registry.from_decorated(*ALL_TOOLS)