From ba0187798a58660fd6ef9e06556cb7be75117d65 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Mon, 17 Jun 2024 14:26:06 +0530 Subject: [PATCH] Get converastion id before retrieving relevant notes in non-socket code --- src/khoj/routers/api_chat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/khoj/routers/api_chat.py b/src/khoj/routers/api_chat.py index 43b1cc0c..1ddcd6f0 100644 --- a/src/khoj/routers/api_chat.py +++ b/src/khoj/routers/api_chat.py @@ -831,6 +831,7 @@ async def chat( conversation = await ConversationAdapters.aget_conversation_by_user( user, request.user.client_app, conversation_id, title ) + conversation_id = conversation.id if conversation else None if not conversation: return Response( content=f"No conversation found with requested id, title", media_type="text/plain", status_code=400