From 98cf095b65651bc6a5516b37670334adfeb746ad Mon Sep 17 00:00:00 2001 From: sabaimran Date: Tue, 7 Nov 2023 16:44:41 -0800 Subject: [PATCH] Fix bug for rendering chat references in LLM response --- src/interface/desktop/chat.html | 2 +- src/khoj/interface/web/chat.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interface/desktop/chat.html b/src/interface/desktop/chat.html index 8666b340..302d4a54 100644 --- a/src/interface/desktop/chat.html +++ b/src/interface/desktop/chat.html @@ -192,9 +192,9 @@ .then(response => { const reader = response.body.getReader(); const decoder = new TextDecoder(); + let references = null; function readStream() { - let references = null; reader.read().then(({ done, value }) => { if (done) { // Evaluate the contents of new_response_text.innerHTML after all the data has been streamed diff --git a/src/khoj/interface/web/chat.html b/src/khoj/interface/web/chat.html index 61f176c7..9712580d 100644 --- a/src/khoj/interface/web/chat.html +++ b/src/khoj/interface/web/chat.html @@ -187,9 +187,9 @@ .then(response => { const reader = response.body.getReader(); const decoder = new TextDecoder(); + let references = null; function readStream() { - let references = null; reader.read().then(({ done, value }) => { if (done) { // Evaluate the contents of new_response_text.innerHTML after all the data has been streamed