Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ class BasicAgent:
|
|
| 44 |
self.agent = CodeAgent(
|
| 45 |
tools=[self.web_search, self.visit_webpage, self.final_answer],
|
| 46 |
model=self.model,
|
| 47 |
-
max_steps=
|
| 48 |
)
|
| 49 |
|
| 50 |
def __call__(self, question: str) -> str:
|
|
@@ -60,6 +60,7 @@ class BasicAgent:
|
|
| 60 |
try:
|
| 61 |
# Run the agent with the question
|
| 62 |
formatted_question = f"{question}\n\nOnly return the exact answer, no explanation."
|
|
|
|
| 63 |
answer = self.agent.run(formatted_question)
|
| 64 |
# answer = self.agent.run(question)
|
| 65 |
print(f"Agent returning answer: {answer[:100]}...")
|
|
|
|
| 44 |
self.agent = CodeAgent(
|
| 45 |
tools=[self.web_search, self.visit_webpage, self.final_answer],
|
| 46 |
model=self.model,
|
| 47 |
+
max_steps=10 # Limit reasoning steps
|
| 48 |
)
|
| 49 |
|
| 50 |
def __call__(self, question: str) -> str:
|
|
|
|
| 60 |
try:
|
| 61 |
# Run the agent with the question
|
| 62 |
formatted_question = f"{question}\n\nOnly return the exact answer, no explanation."
|
| 63 |
+
formatted_question = f"{self.system_prompt}\n\nQuestion: {question}\n\n"
|
| 64 |
answer = self.agent.run(formatted_question)
|
| 65 |
# answer = self.agent.run(question)
|
| 66 |
print(f"Agent returning answer: {answer[:100]}...")
|