We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0c5e62 commit a852ac4Copy full SHA for a852ac4
src/orchestrator/handlers/completions_detection/streaming.rs
@@ -651,7 +651,10 @@ async fn process_detection_batch_stream(
651
}
652
653
654
- // Ensure last completion chunk with finish_reason is sent for each choice
+ // 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.
658
for (choice_index, indices) in batch_tracker {
659
// Get last completion chunk
660
let completions = completion_state.completions.get(&choice_index).unwrap();
0 commit comments