Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import requests
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import (
|
| 7 |
-
|
| 8 |
OpenAIServerModel,
|
| 9 |
DuckDuckGoSearchTool,
|
| 10 |
WikipediaSearchTool,
|
|
@@ -40,11 +40,10 @@ class BasicAgent:
|
|
| 40 |
PythonInterpreterTool(),
|
| 41 |
get_current_date_time,
|
| 42 |
]
|
| 43 |
-
self.agent =
|
| 44 |
tools=tools,
|
| 45 |
model=model,
|
| 46 |
max_steps=10,
|
| 47 |
-
additional_authorized_imports=["math", "datetime", "re", "json", "collections", "itertools", "statistics"],
|
| 48 |
)
|
| 49 |
|
| 50 |
def __call__(self, question: str) -> str:
|
|
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import (
|
| 7 |
+
ToolCallingAgent,
|
| 8 |
OpenAIServerModel,
|
| 9 |
DuckDuckGoSearchTool,
|
| 10 |
WikipediaSearchTool,
|
|
|
|
| 40 |
PythonInterpreterTool(),
|
| 41 |
get_current_date_time,
|
| 42 |
]
|
| 43 |
+
self.agent = ToolCallingAgent(
|
| 44 |
tools=tools,
|
| 45 |
model=model,
|
| 46 |
max_steps=10,
|
|
|
|
| 47 |
)
|
| 48 |
|
| 49 |
def __call__(self, question: str) -> str:
|