Skip to content

Commit bcba743

Browse files
authored
Merge pull request #58 from devchat-ai/fix_chunk_content_none
Fix empty content issue in create_chat_completion_content function
2 parents 5d156e5 + c83058c commit bcba743

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)