Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -1,5 +1,13 @@
|
|
| 1 |
-
from smolagents import
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
import os
|
| 4 |
from vision_tool import image_reasoning_tool
|
| 5 |
|
|
@@ -20,7 +28,7 @@ class GaiaAgent:
|
|
| 20 |
#token = os.getenv("HF_API_TOKEN")
|
| 21 |
#print("DEBUG: HF_API_TOKEN is", token[:6]+ "...")
|
| 22 |
self.model = OpenAIServerModel(
|
| 23 |
-
max_tokens = 8096,
|
| 24 |
temperature = 0.5,
|
| 25 |
model_id = 'qwen/qwen-2.5-coder-32b-instruct:free',
|
| 26 |
#custom_role_conversions=None,
|
|
@@ -29,7 +37,6 @@ class GaiaAgent:
|
|
| 29 |
**common
|
| 30 |
)
|
| 31 |
|
| 32 |
-
|
| 33 |
#Creating the agent
|
| 34 |
self.agent = CodeAgent(
|
| 35 |
model=self.model,
|
|
|
|
| 1 |
+
from smolagents import (
|
| 2 |
+
CodeAgent,
|
| 3 |
+
InferenceClientModel,
|
| 4 |
+
OpenAIServerModel,
|
| 5 |
+
VisitWebpageTool,
|
| 6 |
+
WebSearchTool,
|
| 7 |
+
WikipediaSearchTool,
|
| 8 |
+
PythonInterpreterTool,
|
| 9 |
+
FinalAnswerTool
|
| 10 |
+
)
|
| 11 |
import os
|
| 12 |
from vision_tool import image_reasoning_tool
|
| 13 |
|
|
|
|
| 28 |
#token = os.getenv("HF_API_TOKEN")
|
| 29 |
#print("DEBUG: HF_API_TOKEN is", token[:6]+ "...")
|
| 30 |
self.model = OpenAIServerModel(
|
| 31 |
+
#max_tokens = 8096,
|
| 32 |
temperature = 0.5,
|
| 33 |
model_id = 'qwen/qwen-2.5-coder-32b-instruct:free',
|
| 34 |
#custom_role_conversions=None,
|
|
|
|
| 37 |
**common
|
| 38 |
)
|
| 39 |
|
|
|
|
| 40 |
#Creating the agent
|
| 41 |
self.agent = CodeAgent(
|
| 42 |
model=self.model,
|