Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import pandas as pd
|
|
| 5 |
|
| 6 |
# Import smol-agent and tool components
|
| 7 |
from smolagents import CodeAgent, LiteLLMModel, tool
|
| 8 |
-
from smolagents.tools import
|
| 9 |
from unstructured.partition.auto import partition
|
| 10 |
|
| 11 |
|
|
@@ -50,14 +50,14 @@ class GaiaSmolAgent:
|
|
| 50 |
api_key=api_key,
|
| 51 |
temperature=0.0,
|
| 52 |
)
|
| 53 |
-
|
| 54 |
-
from smolagents.tools import
|
| 55 |
|
| 56 |
# The "Executor" agent - for executing tasks with tools
|
| 57 |
self.executor_agent = CodeAgent(
|
| 58 |
model=self.planner_model, # Can use the same model
|
| 59 |
-
# --- MODIFICATION 2: Use the correct tool name in the list ---
|
| 60 |
-
tools=[file_reader,
|
| 61 |
add_base_tools=True,
|
| 62 |
)
|
| 63 |
print("GaiaSmolAgent initialized successfully with OpenAI.")
|
|
|
|
| 5 |
|
| 6 |
# Import smol-agent and tool components
|
| 7 |
from smolagents import CodeAgent, LiteLLMModel, tool
|
| 8 |
+
from smolagents.tools import DuckDuckGoSearch
|
| 9 |
from unstructured.partition.auto import partition
|
| 10 |
|
| 11 |
|
|
|
|
| 50 |
api_key=api_key,
|
| 51 |
temperature=0.0,
|
| 52 |
)
|
| 53 |
+
|
| 54 |
+
from smolagents.tools import DuckDuckGoSearch
|
| 55 |
|
| 56 |
# The "Executor" agent - for executing tasks with tools
|
| 57 |
self.executor_agent = CodeAgent(
|
| 58 |
model=self.planner_model, # Can use the same model
|
| 59 |
+
# --- MODIFICATION 2: Use the DEFINITIVELY correct tool name in the list ---
|
| 60 |
+
tools=[file_reader, DuckDuckGoSearch()], # Corrected class name
|
| 61 |
add_base_tools=True,
|
| 62 |
)
|
| 63 |
print("GaiaSmolAgent initialized successfully with OpenAI.")
|