Spaces:
Sleeping
Sleeping
Create tools.py
Browse filesCreation of tools file
tools.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from smolagents import DuckDuckGoSearchTool, Tool
|
| 2 |
+
from langchain.agents import load_tools
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
# Initialize the search tools
|
| 7 |
+
|
| 8 |
+
duck_search_tool = DuckDuckGoSearchTool()
|
| 9 |
+
|
| 10 |
+
google_search_tool = Tool.from_langchain(load_tools(["serpapi"])[0])
|