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))
|
return practiceLlmService.score(scenario.name(), scenario.goal(), scenario.strategy(), dialogueTurns(activeSession, scenario))
|
||||||
.map(score -> {
|
.map(score -> {
|
||||||
Integer measuredResponse = responseTimelinessScore(activeSession);
|
Integer measuredResponse = responseTimelinessScore(activeSession);
|
||||||
Integer response = measuredResponse == null && score.responseTimeliness() >= 0
|
Integer response = measuredResponse != null
|
||||||
? score.responseTimeliness() : measuredResponse;
|
? measuredResponse
|
||||||
|
: (score.responseTimeliness() >= 0 ? score.responseTimeliness() : null);
|
||||||
int standardization = average(score.compliance(), score.communication());
|
int standardization = average(score.compliance(), score.communication());
|
||||||
int total = response == null
|
int total = response == null
|
||||||
? score.total()
|
? score.total()
|
||||||
|
|||||||
Reference in New Issue
Block a user