diff --git a/src/khoj/processor/conversation/utils.py b/src/khoj/processor/conversation/utils.py index 5d68d17d..f675d2eb 100644 --- a/src/khoj/processor/conversation/utils.py +++ b/src/khoj/processor/conversation/utils.py @@ -62,10 +62,6 @@ class ThreadedGenerator: self.queue.put(data) def close(self): - if self.compiled_references and len(self.compiled_references) > 0: - self.queue.put(f"### compiled references:{json.dumps(self.compiled_references)}") - if self.online_results and len(self.online_results) > 0: - self.queue.put(f"### compiled references:{json.dumps(self.online_results)}") self.queue.put(StopIteration) diff --git a/src/khoj/routers/api_chat.py b/src/khoj/routers/api_chat.py index 019d0fa9..a6c4cd57 100644 --- a/src/khoj/routers/api_chat.py +++ b/src/khoj/routers/api_chat.py @@ -938,11 +938,6 @@ async def chat( return if not connection_alive or not continue_stream: continue - # Stop streaming after compiled references section of response starts - # References are being processed via the references event rather than the message event - if "### compiled references:" in item: - continue_stream = False - item = item.split("### compiled references:")[0] try: async for result in send_event("message", f"{item}"): yield result