From 03befc9b128e089bc2275761eee41e1b16aff9ef Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Wed, 11 Sep 2024 14:00:35 -0700 Subject: [PATCH] Use consistent user attached image placeholder text for chat actors Get information sources and get output mode don't actually see the images. They just get placeholder text to indicate that the user attached an image to their message for context --- src/khoj/routers/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/khoj/routers/helpers.py b/src/khoj/routers/helpers.py index b94db6cd..49ba1b61 100644 --- a/src/khoj/routers/helpers.py +++ b/src/khoj/routers/helpers.py @@ -270,7 +270,7 @@ async def aget_relevant_information_sources( chat_history = construct_chat_history(conversation_history) if uploaded_image_url: - query = f"[placeholder for image attached to this message]\n{query}" + query = f"[placeholder for user attached image]\n{query}" relevant_tools_prompt = prompts.pick_relevant_information_collection_tools.format( query=query, @@ -330,7 +330,7 @@ async def aget_relevant_output_modes( chat_history = construct_chat_history(conversation_history) if uploaded_image_url: - query = f" \n{query}" + query = f"[placeholder for user attached image]\n{query}" relevant_mode_prompt = prompts.pick_relevant_output_mode.format( query=query,