From ba330712f821c9224bb79dcc817f50e87dc18305 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sun, 26 May 2024 13:56:55 +0530 Subject: [PATCH] Fix to always pass online results in chat API response --- src/khoj/routers/api_chat.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/khoj/routers/api_chat.py b/src/khoj/routers/api_chat.py index b7fef39a..d7783528 100644 --- a/src/khoj/routers/api_chat.py +++ b/src/khoj/routers/api_chat.py @@ -780,6 +780,12 @@ async def chat( actual_response = aggregated_gpt_response.split("### compiled references:")[0] - response_obj = {"response": actual_response, "context": compiled_references} + response_obj = { + "response": actual_response, + "intentType": intent_type, + "inferredQueries": inferred_queries, + "context": compiled_references, + "online_results": online_results, + } return Response(content=json.dumps(response_obj), media_type="application/json", status_code=200)