Skip to content

Commit

Permalink
Sync with latest openai lib
Browse files Browse the repository at this point in the history
Signed-off-by: Yasir Aris M <[email protected]>
  • Loading branch information
yasirarism committed Nov 17, 2023
1 parent 1592376 commit 50923e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misskaty/plugins/chatbot_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def openai_chatbot(_, ctx: Message, strings):
stream=True,
)
async for chunk in response:
if not chunk.choices[0].delta or chunk.choices[0].delta.role:
if not chunk.choices[0].delta.content:
continue
num += 1
answer += chunk.choices[0].delta.content
Expand Down

0 comments on commit 50923e9

Please sign in to comment.