Skip to content

Commit c83058c

Browse files
committed
Fix issue with empty content in create_chat_completion_content function
1 parent 5d156e5 commit c83058c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

unit_tests/openai_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ def create_chat_completion_content(client: Optional[OpenAI] = None, **kwargs) ->
5353
for chunk in chunks:
5454
if chunk.choices[0].finish_reason == "stop":
5555
break
56-
results.append(chunk.choices[0].delta.content)
56+
results.append(chunk.choices[0].delta.content or "")
5757

5858
return "".join(results)

0 commit comments

Comments
 (0)