Refresh the conversation log from the db before addressing the next query

This commit is contained in:
sabaimran 2024-04-30 13:27:51 +05:30
parent f1545d2b2f
commit 93b41170d1

View file

@ -338,6 +338,7 @@ async def websocket_endpoint(
await websocket.accept()
while connection_alive:
try:
await sync_to_async(conversation.refresh_from_db)(fields=["conversation_log"])
q = await websocket.receive_text()
except WebSocketDisconnect:
logger.debug(f"User {user} disconnected web socket")