From 9d7adbcbaaf6a3d21af8cb8d4368bb9f01ae226c Mon Sep 17 00:00:00 2001 From: Debanjum Date: Wed, 27 Aug 2025 14:27:35 -0700 Subject: [PATCH] Pass user attached images to default tool picker for informed selection Previously we were just passing placeholder informing the default mode tool picker that images were attached. --- src/khoj/routers/helpers.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/khoj/routers/helpers.py b/src/khoj/routers/helpers.py index 9eee7be1..5a47bfcc 100644 --- a/src/khoj/routers/helpers.py +++ b/src/khoj/routers/helpers.py @@ -384,9 +384,6 @@ async def aget_data_sources_and_output_format( chat_history_str = construct_chat_history(chat_history, n=6) - if query_images: - query = f"[placeholder for {len(query_images)} user attached images]\n{query}" - personality_context = ( prompts.personality_context.format(personality=agent.personality) if agent and agent.personality else "" ) @@ -409,6 +406,7 @@ async def aget_data_sources_and_output_format( raw_response = await send_message_to_model_wrapper( relevant_tools_prompt, query_files=query_files, + query_images=query_images, response_type="json_object", response_schema=PickTools, fast_model=False,