mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Update webapp.py
This commit is contained in:
parent
f1b4101e83
commit
827a22638c
1 changed files with 4 additions and 4 deletions
|
@ -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'));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue