diff --git a/misskaty/plugins/chatbot_ai.py b/misskaty/plugins/chatbot_ai.py index 4a4b5adf..802d55bb 100644 --- a/misskaty/plugins/chatbot_ai.py +++ b/misskaty/plugins/chatbot_ai.py @@ -68,10 +68,8 @@ async def openai_chatbot(_, ctx: Message, strings): stream=True, ) async for chunk in response: - if not chunk.choices[0].message or chunk.choices[0].message.get("role"): - continue num += 1 - answer += chunk.choices[0].message.content + answer += chunk.choices[0].delta.content if num == 30: await msg.edit_msg(answer) await asyncio.sleep(1.5)