feat: Add fallback to first non-None model answer when best_answer is unset

This commit is contained in:
Andreas Koepf (aider) 2025-03-15 16:52:50 +01:00
parent 424ee6751a
commit a829707408

View file

@ -430,6 +430,11 @@ class AsyncModelEvaluator:
best_score = score
best_answer = model_answer
best_response = response
# If we don't have a best answer yet, use the first non-None answer
elif best_answer is None and model_answer is not None:
best_answer = model_answer
best_response = response
best_score = score
total_score += score