Fix bug where benchmarks are not showing chat convo

This commit is contained in:
hunteraraujo
2023-09-28 23:59:14 -07:00
parent 8c58df706a
commit d91236deda

View File

@@ -203,16 +203,17 @@ class SkillTreeViewModel extends ChangeNotifier {
await benchmarkService.executeBenchmarkStep(
task.id, BenchmarkStepRequestBody(input: node.data.task));
Step step = Step.fromMap(stepResponse);
chatViewModel.fetchChatsForTask();
// Check if it's the last step
while (!step.isLast) {
// Fetch chats for the task
chatViewModel.fetchChatsForTask();
// Execute next step and update the Step object
stepResponse = await benchmarkService.executeBenchmarkStep(
task.id, BenchmarkStepRequestBody(input: null));
step = Step.fromMap(stepResponse);
// Fetch chats for the task
chatViewModel.fetchChatsForTask();
}
// Trigger the evaluation