Create tools.py
Browse files- tools/tools.py +33 -0
tools/tools.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
|
| 3 |
+
from smolagents import (
|
| 4 |
+
DuckDuckGoSearchTool,
|
| 5 |
+
PythonInterpreterTool,
|
| 6 |
+
Tool,
|
| 7 |
+
VisitWebpageTool,
|
| 8 |
+
WikipediaSearchTool,
|
| 9 |
+
)
|
| 10 |
+
|
| 11 |
+
from .describe_image_tool import DescribeImageTool
|
| 12 |
+
from .openai_speech_to_text_tool import OpenAISpeechToTextTool
|
| 13 |
+
from .read_file_tool import ReadFileTool
|
| 14 |
+
from .youtube_transcription_tool import YouTubeTranscriptionTool
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def get_tools() -> List[Tool]:
|
| 18 |
+
"""
|
| 19 |
+
Returns a list of available tools for the agent.
|
| 20 |
+
Returns:
|
| 21 |
+
List[Tool]: List of initialized tool instances.
|
| 22 |
+
"""
|
| 23 |
+
tools = [
|
| 24 |
+
DuckDuckGoSearchTool(),
|
| 25 |
+
PythonInterpreterTool(),
|
| 26 |
+
WikipediaSearchTool(),
|
| 27 |
+
VisitWebpageTool(),
|
| 28 |
+
OpenAISpeechToTextTool(),
|
| 29 |
+
YouTubeTranscriptionTool(),
|
| 30 |
+
ReadFileTool(),
|
| 31 |
+
DescribeImageTool(),
|
| 32 |
+
]
|
| 33 |
+
return tools
|