laverdes commited on
Commit
a9f6ccb
·
verified ·
1 Parent(s): f1ede08

feat: final answer generation

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -20,7 +20,10 @@ class BasicAgent:
20
  print("BasicAgent initialized.")
21
  def __call__(self, question: str) -> str:
22
  print(f"Agent received question (first 50 chars): {question[:50]}...")
23
- answer = self.agent.chat(question)
 
 
 
24
  print(f"Agent returning answer: {answer}")
25
  return answer
26
 
 
20
  print("BasicAgent initialized.")
21
  def __call__(self, question: str) -> str:
22
  print(f"Agent received question (first 50 chars): {question[:50]}...")
23
+ answer = self.agent.chat(
24
+ question,
25
+ only_final_answer=True
26
+ )
27
  print(f"Agent returning answer: {answer}")
28
  return answer
29