Download astrbot/core/agent/tool_executor.py from qa1145/astrbbbb: direct link, hf CLI and curl.
- Browser
- Download file 438 Bytes
-
https://huggingface.co/spaces/qa1145/astrbbbb/resolve/main/astrbot/core/agent/tool_executor.py
- Command line
-
hf download hf://spaces/qa1145/astrbbbb/astrbot/core/agent/tool_executor.py
-
curl -L -o tool_executor.py https://huggingface.co/spaces/qa1145/astrbbbb/resolve/main/astrbot/core/agent/tool_executor.py
438 Bytes
| from collections.abc import AsyncGenerator | |
| from typing import Any, Generic | |
| import mcp | |
| from .run_context import ContextWrapper, TContext | |
| from .tool import FunctionTool | |
| class BaseFunctionToolExecutor(Generic[TContext]): | |
| async def execute( | |
| cls, | |
| tool: FunctionTool, | |
| run_context: ContextWrapper[TContext], | |
| **tool_args, | |
| ) -> AsyncGenerator[Any | mcp.types.CallToolResult, None]: ... | |