mmichiels13 commited on
Commit
0b0ce42
·
verified ·
1 Parent(s): cd04655

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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=5 # Limit reasoning 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]}...")