Skip to content

Commit

Permalink
fixed bug in AsyncUnify streaming.
Browse files Browse the repository at this point in the history
  • Loading branch information
djl11 committed Sep 13, 2024
1 parent 54dbda2 commit 0571034
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion unify/chat/clients/uni_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,8 @@ async def _generate_stream(
self.set_provider(chunk.model.split("@")[-1])
if message_content_only:
yield chunk.choices[0].delta.content or ""
yield chunk
else:
yield chunk
except openai.APIStatusError as e:
raise Exception(e.message)

Expand Down

0 comments on commit 0571034

Please sign in to comment.