Skip to content

Commit a852ac4

Browse files
committed
Update comments
Signed-off-by: declark1 <44146800+declark1@users.noreply.github.com>
1 parent f0c5e62 commit a852ac4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/orchestrator/handlers/completions_detection/streaming.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,10 @@ async fn process_detection_batch_stream(
651651
}
652652
}
653653
}
654-
// Ensure last completion chunk with finish_reason is sent for each choice
654+
// Ensure last completion chunk with finish_reason is sent for each choice.
655+
//
656+
// NOTE: A known edge case where the last completion chunk would not have been included in the final batch
657+
// is if it has empty choice text. This is because chunks without choice text are not sent to the detection pipeline.
655658
for (choice_index, indices) in batch_tracker {
656659
// Get last completion chunk
657660
let completions = completion_state.completions.get(&choice_index).unwrap();

0 commit comments

Comments
 (0)