Commit 2c
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ class BasicAgent:
|
|
| 25 |
model_id=os.environ.get("model")
|
| 26 |
)
|
| 27 |
|
| 28 |
-
|
| 29 |
model=model,
|
| 30 |
tools=[DuckDuckGoSearchTool(),VisitWebpageTool(),FinalAnswerTool()],
|
| 31 |
additional_authorized_imports=["pandas"],
|
|
@@ -35,7 +35,7 @@ class BasicAgent:
|
|
| 35 |
|
| 36 |
def __call__(self, question: str) -> str:
|
| 37 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 38 |
-
answer =
|
| 39 |
print(f"Agent returning answer: {answer}")
|
| 40 |
return answer
|
| 41 |
|
|
|
|
| 25 |
model_id=os.environ.get("model")
|
| 26 |
)
|
| 27 |
|
| 28 |
+
smart_agent = CodeAgent(
|
| 29 |
model=model,
|
| 30 |
tools=[DuckDuckGoSearchTool(),VisitWebpageTool(),FinalAnswerTool()],
|
| 31 |
additional_authorized_imports=["pandas"],
|
|
|
|
| 35 |
|
| 36 |
def __call__(self, question: str) -> str:
|
| 37 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 38 |
+
answer = smart_agent.run(question)
|
| 39 |
print(f"Agent returning answer: {answer}")
|
| 40 |
return answer
|
| 41 |
|