|
17 | 17 |
|
18 | 18 | from typing_extensions import TypedDict, cast |
19 | 19 |
|
20 | | -from strands.tools.decorator import DecoratedFunctionTool |
21 | | - |
22 | 20 | from .._async import run_async |
23 | 21 | from ..experimental.tools import ToolProvider |
| 22 | +from ..tools.decorator import DecoratedFunctionTool |
24 | 23 | from ..types.tools import AgentTool, ToolSpec |
25 | 24 | from .loader import load_tool_from_string, load_tools_from_module |
26 | 25 | from .tools import PythonAgentTool, normalize_schema, normalize_tool_spec |
@@ -49,16 +48,19 @@ def process_tools(self, tools: List[Any]) -> List[str]: |
49 | 48 | imported modules, @tool decorated functions, or instances of AgentTool. |
50 | 49 |
|
51 | 50 | Args: |
52 | | - tools: List of tool specifications. |
53 | | - Can be: |
54 | | - 1. Local file path to a module based tool: `./path/to/module/tool.py` |
55 | | - 2. Module import path |
56 | | - 2.1. Path to a module based tool: `strands_tools.file_read` |
57 | | - 2.2. Path to a module with multiple AgentTool instances (@tool decorated): `tests.fixtures.say_tool` |
58 | | - 2.3. Path to a module and a specific function: `tests.fixtures.say_tool:say` |
59 | | - 3. A module for a module based tool |
60 | | - 4. Instances of AgentTool (@tool decorated functions) |
61 | | - 5. Dictionaries with name/path keys (deprecated) |
| 51 | + tools: List of tool specifications. Can be: |
| 52 | +
|
| 53 | + 1. Local file path to a module based tool: `./path/to/module/tool.py` |
| 54 | + 2. Module import path |
| 55 | +
|
| 56 | + 2.1. Path to a module based tool: `strands_tools.file_read` |
| 57 | + 2.2. Path to a module with multiple AgentTool instances (@tool decorated): |
| 58 | + `tests.fixtures.say_tool` |
| 59 | + 2.3. Path to a module and a specific function: `tests.fixtures.say_tool:say` |
| 60 | +
|
| 61 | + 3. A module for a module based tool |
| 62 | + 4. Instances of AgentTool (@tool decorated functions) |
| 63 | + 5. Dictionaries with name/path keys (deprecated) |
62 | 64 |
|
63 | 65 |
|
64 | 66 | Returns: |
|
0 commit comments