randydev commited on
Commit
ef75606
·
verified ·
1 Parent(s): 4d6a968

Update chatbot/plugins/chat.py

Browse files
Files changed (1) hide show
  1. chatbot/plugins/chat.py +1 -1
chatbot/plugins/chat.py CHANGED
@@ -61,7 +61,7 @@ async def process_stream(message, prompt):
61
  for chunk in stream:
62
  new_content = chunk.choices[0].delta.content
63
  accumulated_text += new_content
64
- backup_chat.append({"role": "assistant", "content": accumulated_text})
65
  await db._update_openai_chat_in_db(message.from_user.id, backup_chat)
66
  return accumulated_text
67
 
 
61
  for chunk in stream:
62
  new_content = chunk.choices[0].delta.content
63
  accumulated_text += new_content
64
+ backup_chat.append({"role": "user", "content": accumulated_text})
65
  await db._update_openai_chat_in_db(message.from_user.id, backup_chat)
66
  return accumulated_text
67