Spaces:
Running
Running
Update agent.py
Browse files
agent.py
CHANGED
@@ -6,13 +6,14 @@ class MagAgent:
|
|
6 |
"""Initialize the MagAgent with search tools."""
|
7 |
print("Initializing MagAgent with search tools...")
|
8 |
self.agent = CodeAgent(
|
9 |
-
model=OpenAIServerModel(model_id="gpt-4o
|
10 |
tools=[
|
11 |
DuckDuckGoSearchTool(),
|
12 |
WikipediaSearchTool()
|
13 |
]
|
14 |
)
|
15 |
-
print("MagAgent initialized."
|
|
|
16 |
|
17 |
async def __call__(self, question: str) -> str:
|
18 |
"""Process a question asynchronously using the MagAgent."""
|
|
|
6 |
"""Initialize the MagAgent with search tools."""
|
7 |
print("Initializing MagAgent with search tools...")
|
8 |
self.agent = CodeAgent(
|
9 |
+
model=OpenAIServerModel(model_id="gpt-4o"),
|
10 |
tools=[
|
11 |
DuckDuckGoSearchTool(),
|
12 |
WikipediaSearchTool()
|
13 |
]
|
14 |
)
|
15 |
+
print("MagAgent initialized."
|
16 |
+
)
|
17 |
|
18 |
async def __call__(self, question: str) -> str:
|
19 |
"""Process a question asynchronously using the MagAgent."""
|