Skip to content

Commit c0c4e85

Browse files
author
mondaylord
authored
Merge pull request #6 from Dstack-TEE/fix/e2ee-with-empty-chunk
fix: e2ee now deletes the first empty chunk
2 parents aa1ae33 + 99491be commit c0c4e85

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/app/api/v1/e2ee.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ def encrypt_chat_completion_chunk(
505505

506506
for choice_index, choice in enumerate(chunk_data.get("choices", [])):
507507
delta = choice.get("delta") or {}
508+
if delta.get("content", None) == "":
509+
del delta["content"]
508510
_encrypt_field(
509511
delta,
510512
"content",

0 commit comments

Comments
 (0)