Download src/tools/__init__.py from MHamdan/SPARKNET: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/spaces/MHamdan/SPARKNET/resolve/76c3b0a8cd44eb930c2ad41fc0e95acdb3cd2bab/src/tools/__init__.py
- Command line
-
hf download hf://spaces/MHamdan/SPARKNET@76c3b0a8cd44eb930c2ad41fc0e95acdb3cd2bab/src/tools/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/MHamdan/SPARKNET/resolve/76c3b0a8cd44eb930c2ad41fc0e95acdb3cd2bab/src/tools/__init__.py
1.22 kB
| """ | |
| Tools module for SPARKNET | |
| """ | |
| from .base_tool import BaseTool, ToolResult, ToolRegistry, get_tool_registry | |
| from .file_tools import FileReaderTool, FileWriterTool, FileSearchTool, DirectoryListTool | |
| from .code_tools import PythonExecutorTool, BashExecutorTool | |
| from .gpu_tools import GPUMonitorTool, GPUSelectTool | |
| __all__ = [ | |
| "BaseTool", | |
| "ToolResult", | |
| "ToolRegistry", | |
| "get_tool_registry", | |
| "FileReaderTool", | |
| "FileWriterTool", | |
| "FileSearchTool", | |
| "DirectoryListTool", | |
| "PythonExecutorTool", | |
| "BashExecutorTool", | |
| "GPUMonitorTool", | |
| "GPUSelectTool", | |
| ] | |
| def register_default_tools() -> ToolRegistry: | |
| """ | |
| Register all default tools in the registry. | |
| Returns: | |
| ToolRegistry with default tools registered | |
| """ | |
| registry = get_tool_registry() | |
| # File tools | |
| registry.register(FileReaderTool()) | |
| registry.register(FileWriterTool()) | |
| registry.register(FileSearchTool()) | |
| registry.register(DirectoryListTool()) | |
| # Code execution tools | |
| registry.register(PythonExecutorTool()) | |
| registry.register(BashExecutorTool()) | |
| # GPU tools | |
| registry.register(GPUMonitorTool()) | |
| registry.register(GPUSelectTool()) | |
| return registry | |