From cead1598b919c83f731d88a4c60d192acdb4480d Mon Sep 17 00:00:00 2001 From: sabaimran Date: Fri, 1 Nov 2024 13:00:11 -0700 Subject: [PATCH] Don't reset research mode after completing research execution --- src/khoj/routers/api_chat.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/khoj/routers/api_chat.py b/src/khoj/routers/api_chat.py index 55fd0c31..12583815 100644 --- a/src/khoj/routers/api_chat.py +++ b/src/khoj/routers/api_chat.py @@ -757,7 +757,6 @@ async def chat( yield research_result # researched_results = await extract_relevant_info(q, researched_results, agent) - in_research_mode = False logger.info(f"Researched Results: {researched_results}") for cmd in conversation_commands: @@ -1022,7 +1021,7 @@ async def chat( # Generate Output ## Generate Image Output - if ConversationCommand.Image in conversation_commands: + if ConversationCommand.Image in conversation_commands and not in_research_mode: async for result in text_to_image( defiltered_query, user,