From 5bb36895625421f586ab2b953184c243137431e6 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Sun, 2 Jun 2024 11:31:15 +0530 Subject: [PATCH] Do not stream responses in the scheduled_chat response --- src/khoj/routers/helpers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/khoj/routers/helpers.py b/src/khoj/routers/helpers.py index d8102517..6af8b9d0 100644 --- a/src/khoj/routers/helpers.py +++ b/src/khoj/routers/helpers.py @@ -972,6 +972,9 @@ def scheduled_chat( scheme = "http" if not calling_url.is_secure else "https" query_dict = parse_qs(calling_url.query) + # Pop the stream value from query_dict if it exists + query_dict.pop("stream", None) + # Replace the original scheduling query with the scheduled query query_dict["q"] = [query_to_run]