diff --git a/src/khoj/routers/helpers.py b/src/khoj/routers/helpers.py index 6af8b9d0..f144044e 100644 --- a/src/khoj/routers/helpers.py +++ b/src/khoj/routers/helpers.py @@ -287,16 +287,16 @@ async def aget_relevant_output_modes(query: str, conversation_history: dict, is_ response = response.strip() if is_none_or_empty(response): - return ConversationCommand.Default + return ConversationCommand.Text if response in mode_options.keys(): # Check whether the tool exists as a valid ConversationCommand return ConversationCommand(response) - return ConversationCommand.Default - except Exception as e: + return ConversationCommand.Text + except Exception: logger.error(f"Invalid response for determining relevant mode: {response}") - return ConversationCommand.Default + return ConversationCommand.Text async def infer_webpage_urls(q: str, conversation_history: dict, location_data: LocationData) -> List[str]: diff --git a/src/khoj/utils/helpers.py b/src/khoj/utils/helpers.py index 48be715b..fd44ba85 100644 --- a/src/khoj/utils/helpers.py +++ b/src/khoj/utils/helpers.py @@ -304,6 +304,7 @@ class ConversationCommand(str, Enum): Online = "online" Webpage = "webpage" Image = "image" + Text = "text" Automation = "automation" AutomatedTask = "automated_task" @@ -330,7 +331,7 @@ tool_descriptions_for_llm = { mode_descriptions_for_llm = { ConversationCommand.Image: "Use this if the user is requesting an image or visual response to their query.", ConversationCommand.Automation: "Use this if the user is requesting a response at a scheduled date or time.", - ConversationCommand.Default: "Use this if the other response modes don't seem to fit the query.", + ConversationCommand.Text: "Use this if the other response modes don't seem to fit the query.", }