Skip to content

Commit

Permalink
Refresh the conversation log from the db before addressing the next q…
Browse files Browse the repository at this point in the history
…uery
  • Loading branch information
sabaimran committed Apr 30, 2024
1 parent f1545d2 commit 93b4117
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/khoj/routers/api_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ async def send_rate_limit_message(message: str):
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")
Expand Down

0 comments on commit 93b4117

Please sign in to comment.