diff --git a/src/khoj/routers/api_chat.py b/src/khoj/routers/api_chat.py index 8f4d9f31..fed6a559 100644 --- a/src/khoj/routers/api_chat.py +++ b/src/khoj/routers/api_chat.py @@ -860,9 +860,9 @@ async def chat( async for result in send_llm_response(f"Conversation {conversation_id} not found", tracer.get("usage")): yield result return - conversation_id = conversation.id + conversation_id = str(conversation.id) - async for event in send_event(ChatEvent.METADATA, {"conversationId": str(conversation_id), "turnId": turn_id}): + async for event in send_event(ChatEvent.METADATA, {"conversationId": conversation_id, "turnId": turn_id}): yield event agent: Agent | None = None @@ -1383,7 +1383,6 @@ async def chat( conversation_commands, user, request.user.client_app, - conversation_id, location, user_name, researched_results, diff --git a/src/khoj/routers/helpers.py b/src/khoj/routers/helpers.py index b5c489b4..38cf9174 100644 --- a/src/khoj/routers/helpers.py +++ b/src/khoj/routers/helpers.py @@ -1359,7 +1359,6 @@ async def agenerate_chat_response( conversation_commands: List[ConversationCommand] = [ConversationCommand.Default], user: KhojUser = None, client_application: ClientApplication = None, - conversation_id: str = None, location_data: LocationData = None, user_name: Optional[str] = None, meta_research: str = "", @@ -1394,7 +1393,7 @@ async def agenerate_chat_response( operator_results=operator_results, inferred_queries=inferred_queries, client_application=client_application, - conversation_id=conversation_id, + conversation_id=str(conversation.id), query_images=query_images, train_of_thought=train_of_thought, raw_query_files=raw_query_files,