Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
|
@@ -5,7 +5,6 @@ import inspect
|
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import (
|
| 7 |
CodeAgent,
|
| 8 |
-
ToolCallingAgent,
|
| 9 |
DuckDuckGoSearchTool,
|
| 10 |
VisitWebpageTool,
|
| 11 |
WikipediaSearchTool,
|
|
@@ -35,17 +34,6 @@ class BasicAgent:
|
|
| 35 |
print("Initializing BasicAgent...")
|
| 36 |
model = self._get_model()
|
| 37 |
|
| 38 |
-
web_agent = ToolCallingAgent(
|
| 39 |
-
tools=[DuckDuckGoSearchTool(), VisitWebpageTool()],
|
| 40 |
-
model=model,
|
| 41 |
-
name="web_search_agent",
|
| 42 |
-
description=(
|
| 43 |
-
"A web search agent that can search the internet and visit web pages. "
|
| 44 |
-
"Give it a clear, specific research question and it will return the relevant information found."
|
| 45 |
-
),
|
| 46 |
-
max_steps=10,
|
| 47 |
-
)
|
| 48 |
-
|
| 49 |
self.agent = CodeAgent(
|
| 50 |
tools=[
|
| 51 |
DuckDuckGoSearchTool(),
|
|
@@ -53,14 +41,13 @@ class BasicAgent:
|
|
| 53 |
VisitWebpageTool(),
|
| 54 |
],
|
| 55 |
model=model,
|
| 56 |
-
managed_agents=[web_agent],
|
| 57 |
additional_authorized_imports=[
|
| 58 |
"json", "re", "math", "statistics", "datetime",
|
| 59 |
"csv", "collections", "itertools", "functools",
|
| 60 |
"unicodedata", "string", "fractions", "decimal",
|
| 61 |
],
|
| 62 |
-
planning_interval=
|
| 63 |
-
max_steps=
|
| 64 |
)
|
| 65 |
print("BasicAgent initialized successfully.")
|
| 66 |
|
|
|
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import (
|
| 7 |
CodeAgent,
|
|
|
|
| 8 |
DuckDuckGoSearchTool,
|
| 9 |
VisitWebpageTool,
|
| 10 |
WikipediaSearchTool,
|
|
|
|
| 34 |
print("Initializing BasicAgent...")
|
| 35 |
model = self._get_model()
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
self.agent = CodeAgent(
|
| 38 |
tools=[
|
| 39 |
DuckDuckGoSearchTool(),
|
|
|
|
| 41 |
VisitWebpageTool(),
|
| 42 |
],
|
| 43 |
model=model,
|
|
|
|
| 44 |
additional_authorized_imports=[
|
| 45 |
"json", "re", "math", "statistics", "datetime",
|
| 46 |
"csv", "collections", "itertools", "functools",
|
| 47 |
"unicodedata", "string", "fractions", "decimal",
|
| 48 |
],
|
| 49 |
+
planning_interval=3,
|
| 50 |
+
max_steps=12,
|
| 51 |
)
|
| 52 |
print("BasicAgent initialized successfully.")
|
| 53 |
|