Fix issue with empty content in create_chat_completion_content function
This commit is contained in:
parent
5d156e55b2
commit
c83058cbea
@ -53,6 +53,6 @@ def create_chat_completion_content(client: Optional[OpenAI] = None, **kwargs) ->
|
||||
for chunk in chunks:
|
||||
if chunk.choices[0].finish_reason == "stop":
|
||||
break
|
||||
results.append(chunk.choices[0].delta.content)
|
||||
results.append(chunk.choices[0].delta.content or "")
|
||||
|
||||
return "".join(results)
|
||||
|
Loading…
x
Reference in New Issue
Block a user