diff --git a/src/khoj/routers/api_chat.py b/src/khoj/routers/api_chat.py index d971bf4b..da52746a 100644 --- a/src/khoj/routers/api_chat.py +++ b/src/khoj/routers/api_chat.py @@ -1064,11 +1064,11 @@ async def chat( if not ConversationCommand.Research in conversation_commands: try: async for result in search_documents( - user, - chat_history, q, (n or 7), d, + user, + chat_history, conversation_id, conversation_commands, location, diff --git a/src/khoj/routers/helpers.py b/src/khoj/routers/helpers.py index e1a7f812..11e729cf 100644 --- a/src/khoj/routers/helpers.py +++ b/src/khoj/routers/helpers.py @@ -1159,11 +1159,11 @@ async def generate_better_image_prompt( async def search_documents( - user: KhojUser, - chat_history: list[ChatMessageModel], q: str, n: int, d: float, + user: KhojUser, + chat_history: list[ChatMessageModel], conversation_id: str, conversation_commands: List[ConversationCommand] = [ConversationCommand.Default], location_data: LocationData = None, diff --git a/src/khoj/routers/research.py b/src/khoj/routers/research.py index 2e9a1b79..8cb415cb 100644 --- a/src/khoj/routers/research.py +++ b/src/khoj/routers/research.py @@ -313,11 +313,11 @@ async def research( c["query"] for iteration in previous_iterations if iteration.context for c in iteration.context } async for result in search_documents( - user, - construct_tool_chat_history(previous_iterations, ConversationCommand.Notes), this_iteration.query, max_document_searches, None, + user, + construct_tool_chat_history(previous_iterations, ConversationCommand.Notes), conversation_id, [ConversationCommand.Default], location,