Spaces:
Sleeping
Sleeping
Create agents.py
Browse filesCreation of agents file
agents.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, HfApiModel
|
| 2 |
+
from tools import duck_search_tool, google_search_tool
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
# Initialize the model for agent_1
|
| 7 |
+
model_1 = HfApiModel()
|
| 8 |
+
agent_1_instructions = "Search for and retrieve relevant information about the question asked:\n"
|
| 9 |
+
agent_1 = CodeAgent(
|
| 10 |
+
model = model_1,
|
| 11 |
+
tools=[duck_search_tool]
|
| 12 |
+
)
|