fix: prevent NPE on practice finish without measured response latency
This commit is contained in:
+3
-2
@@ -746,8 +746,9 @@ public class AihrPracticeSeedService {
|
||||
return practiceLlmService.score(scenario.name(), scenario.goal(), scenario.strategy(), dialogueTurns(activeSession, scenario))
|
||||
.map(score -> {
|
||||
Integer measuredResponse = responseTimelinessScore(activeSession);
|
||||
Integer response = measuredResponse == null && score.responseTimeliness() >= 0
|
||||
? score.responseTimeliness() : measuredResponse;
|
||||
Integer response = measuredResponse != null
|
||||
? measuredResponse
|
||||
: (score.responseTimeliness() >= 0 ? score.responseTimeliness() : null);
|
||||
int standardization = average(score.compliance(), score.communication());
|
||||
int total = response == null
|
||||
? score.total()
|
||||
|
||||
Reference in New Issue
Block a user