Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirarism committed Aug 14, 2024
1 parent 9be13c3 commit c03b732
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion misskaty/plugins/chatbot_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ async def openai_chatbot(self, ctx: Message, strings):
user_conversations[uid] = [{"role": "user", "content": pertanyaan}]
else:
user_conversations[uid].append({"role": "user", "content": pertanyaan})
ai_response = await get_openai_stream_response(user_conversations[uid], bmsg)
ai_response = await get_openai_stream_response(user_conversations[uid], msg)
if not ai_response:
user_conversations[user_id].pop()
if len(user_conversations[user_id]) == 1:
user_conversations.pop(user_id)
return
user_conversations[uid].append({"role": "assistant", "content": ai_response})

0 comments on commit c03b732

Please sign in to comment.