Update app.py
Browse files
app.py
CHANGED
|
@@ -24,14 +24,14 @@ class BasicAgent:
|
|
| 24 |
)
|
| 25 |
self.model.flatten_messages_as_text = True
|
| 26 |
|
| 27 |
-
self.agent =
|
| 28 |
tools=[DuckDuckGoSearchTool(), FinalAnswerTool(), VisitWebpageTool(), PythonInterpreterTool()],
|
| 29 |
model=self.model,
|
| 30 |
)
|
| 31 |
|
| 32 |
def __call__(self, question: str) -> str:
|
| 33 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 34 |
-
response = self.agent.run(question
|
| 35 |
return response
|
| 36 |
|
| 37 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
|
|
| 24 |
)
|
| 25 |
self.model.flatten_messages_as_text = True
|
| 26 |
|
| 27 |
+
self.agent = CodeAgent(
|
| 28 |
tools=[DuckDuckGoSearchTool(), FinalAnswerTool(), VisitWebpageTool(), PythonInterpreterTool()],
|
| 29 |
model=self.model,
|
| 30 |
)
|
| 31 |
|
| 32 |
def __call__(self, question: str) -> str:
|
| 33 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 34 |
+
response = self.agent.run(question)
|
| 35 |
return response
|
| 36 |
|
| 37 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|