bilalhf commited on
Commit
330b1a1
·
verified ·
1 Parent(s): 3b207bd

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +4 -1
agent.py CHANGED
@@ -215,6 +215,9 @@ def generate_answer(question: str) -> str:
215
 
216
  # Extract only the answer part after 'FINAL ANSWER:'
217
  match = re.search(r"FINAL ANSWER:\s*(.+)", raw_text, re.IGNORECASE)
218
- return match.group(1).strip() if match else raw_text
 
 
 
219
 
220
  return "I'm not sure."
 
215
 
216
  # Extract only the answer part after 'FINAL ANSWER:'
217
  match = re.search(r"FINAL ANSWER:\s*(.+)", raw_text, re.IGNORECASE)
218
+ if match:
219
+ return match.group(1).strip()
220
+ else:
221
+ return raw_text
222
 
223
  return "I'm not sure."