From 827a22638cb7850482c9746366250c8a01d1d970 Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Tue, 21 Feb 2023 23:44:29 +0800 Subject: [PATCH] Update webapp.py --- searx/webapp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 862112750..f952c1e19 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -915,11 +915,11 @@ const prev_chat = document.getElementById('chat').innerHTML; return; } const { choices } = JSON.parse(result); - if(choices[0].logprobes.text_offset[0] > text_offset) + if(choices[0].logprobs.text_offset[0] > text_offset) { chatTextRaw+=choices[0].text - text_offset = choices[0].logprobes.text_offset[choices[0].logprobes.text_offset.length - 1] + text_offset = choices[0].logprobs.text_offset[choices[0].logprobs.text_offset.length - 1] } document.querySelector("#prompt").innerHTML=""; @@ -1017,10 +1017,10 @@ let prompt = JSON.parse(document.querySelector("#prompt").textContent); return; } const { choices } = JSON.parse(result); - if(choices[0].logprobes.text_offset[0] > text_offset) + if(choices[0].logprobs.text_offset[0] > text_offset) { chatTextRaw+=choices[0].text - text_offset = choices[0].logprobes.text_offset[choices[0].logprobes.text_offset.length - 1] + text_offset = choices[0].logprobs.text_offset[choices[0].logprobs.text_offset.length - 1] } markdownToHtml(beautify(chatTextRaw), document.getElementById('chat'));