Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
| 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."
|