Correct task ended message checking from "ended in" to "ended with"

This commit is contained in:
Ayush Maniar 2025-03-15 22:55:41 -07:00
parent 7c96cca59c
commit 4d1319f530

View file

@ -76,7 +76,7 @@ def analyze_json_file(file_path):
if 'turns' in data and isinstance(data['turns'], list):
for turn in reversed(data['turns']): # Check turns from the end
if turn.get('role') == 'system' and isinstance(turn.get('content'), str):
if "Task successful ended with code : 2" in turn['content'] or "Task ended in score: 1" in turn["content"]:
if "Task successful ended with code : 2" in turn['content'] or "Task ended with score : 1" in turn["content"] or "Task ended in score: 1" in turn["content"]:
return True
return False
except FileNotFoundError: