Aya1610 commited on
Commit
45e3b70
·
verified ·
1 Parent(s): 9f33f75

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -2
agent.py CHANGED
@@ -58,12 +58,12 @@ def find_answer(query: str) -> str:
58
  if "Final answer :" in full_content:
59
  # Extract everything after the first occurrence of “Final answer :”
60
  answer_text = full_content.split("Final answer :", 1)[1].strip()
61
- return f"Final answer : {answer_text}"
62
 
63
  # Fallback if they used “Answer:” instead
64
  if "Answer:" in full_content:
65
  answer_text = full_content.split("Answer:", 1)[1].strip()
66
- return f"Answer: {answer_text}"
67
 
68
  # If neither tag exists, just return whatever is after the last newline
69
  # (or the entire text, but without the question prefix).
 
58
  if "Final answer :" in full_content:
59
  # Extract everything after the first occurrence of “Final answer :”
60
  answer_text = full_content.split("Final answer :", 1)[1].strip()
61
+ return answer_text
62
 
63
  # Fallback if they used “Answer:” instead
64
  if "Answer:" in full_content:
65
  answer_text = full_content.split("Answer:", 1)[1].strip()
66
+ return answer_text
67
 
68
  # If neither tag exists, just return whatever is after the last newline
69
  # (or the entire text, but without the question prefix).