Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,8 @@ import pandas as pd
|
|
6 |
from smolagents import CodeAgent, DuckDuckGoSearchTool
|
7 |
from smolagents.models import OpenAIServerModel
|
8 |
|
9 |
-
from tools import WikipediaTool, WikipediaSearchTool
|
|
|
10 |
|
11 |
# Define the system prompt
|
12 |
SYSTEM_PROMPT = """You are a general AI assistant. I will ask you a question.
|
@@ -32,8 +33,10 @@ class MyAgent:
|
|
32 |
self.model = PatchedOpenAIServerModel(model_id="gpt-4-turbo")
|
33 |
self.agent = CodeAgent(tools=[
|
34 |
DuckDuckGoSearchTool(),
|
35 |
-
|
36 |
-
|
|
|
|
|
37 |
], model=self.model)
|
38 |
|
39 |
def __call__(self, task: dict) -> str:
|
|
|
6 |
from smolagents import CodeAgent, DuckDuckGoSearchTool
|
7 |
from smolagents.models import OpenAIServerModel
|
8 |
|
9 |
+
#from tools import WikipediaTool, WikipediaSearchTool
|
10 |
+
from tools import WikipediaToolWrapper, WikipediaSearchToolWrapper
|
11 |
|
12 |
# Define the system prompt
|
13 |
SYSTEM_PROMPT = """You are a general AI assistant. I will ask you a question.
|
|
|
33 |
self.model = PatchedOpenAIServerModel(model_id="gpt-4-turbo")
|
34 |
self.agent = CodeAgent(tools=[
|
35 |
DuckDuckGoSearchTool(),
|
36 |
+
WikipediaToolWrapper(),
|
37 |
+
WikipediaSearchToolWrapper()
|
38 |
+
#WikipediaSearchTool(),
|
39 |
+
#WikipediaTool()
|
40 |
], model=self.model)
|
41 |
|
42 |
def __call__(self, task: dict) -> str:
|