Skip to content

Commit 37c0130

Browse files
committed
Update merge_content
Signed-off-by: declark1 <[email protected]>
1 parent 6184e1d commit 37c0130

File tree

1 file changed

+1
-5
lines changed
  • src/orchestrator/handlers/chat_completions_detection

1 file changed

+1
-5
lines changed

src/orchestrator/handlers/chat_completions_detection/streaming.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -684,11 +684,7 @@ fn merge_content(chunks: &[ChatCompletionChunk]) -> Option<Content> {
684684
.and_then(|choice| choice.delta.content.clone())
685685
})
686686
.collect::<String>();
687-
if content_text.is_empty() {
688-
None
689-
} else {
690-
Some(Content::Text(content_text))
691-
}
687+
(!content_text.is_empty()).then_some(Content::Text(content_text))
692688
}
693689

694690
/// Consumes a detection batch stream, builds responses, and sends them to a response channel.

0 commit comments

Comments
 (0)