learn-agent-unit4 / utils /final_answer.py
Vindemia's picture
init commit
c089d04
raw
history blame contribute delete
207 Bytes
def extract_final_answer(text):
if "FINAL ANSWER:" in text:
start_index = text.find("FINAL ANSWER:") + len("FINAL ANSWER:")
return text[start_index:].strip()
else:
return None