| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- """
- find_agent 工具包
- 在此注册本 Agent 专属的工具。
- """
- from __future__ import annotations
- from collections.abc import Callable
- from typing import Any
- from agents.find_agent.tools.douyin_detail import douyin_detail
- from agents.find_agent.tools.douyin_search import douyin_search
- from agents.find_agent.tools.hotspot_profile import (
- batch_fetch_portraits,
- get_account_fans_portrait,
- get_content_fans_portrait,
- )
- from agents.find_agent.tools.qwen_video_analyze import qwen_video_analyze
- from supply_agent.tools.registry import ToolRegistry
- ALL_TOOLS: list[Callable[..., Any]] = [
- douyin_search,
- douyin_detail,
- get_content_fans_portrait,
- get_account_fans_portrait,
- batch_fetch_portraits,
- qwen_video_analyze,
- ]
- __all__ = [
- "ALL_TOOLS",
- "douyin_search",
- "douyin_detail",
- "get_content_fans_portrait",
- "get_account_fans_portrait",
- "batch_fetch_portraits",
- "qwen_video_analyze",
- "register_all_tools",
- ]
- def register_all_tools(registry: ToolRegistry) -> ToolRegistry:
- """将 find_agent 包内的所有工具注册到 ToolRegistry。"""
- return registry.from_decorated(*ALL_TOOLS)
|