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
7b700468ff
commit
2ba3f02ef7
1 changed files with 10 additions and 10 deletions
|
@ -1070,8 +1070,8 @@ prev_chat = prev_chat+'<div class="chat_question">'+document.querySelector("#pro
|
||||||
let choices;
|
let choices;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
try{JSON.parse(half+result)['choices'];half = '';}
|
try{choice=JSON.parse(half+result)['choices'];half = '';}
|
||||||
catch(e){JSON.parse(result)['choices'];half = '';}
|
catch(e){choice=JSON.parse(result)['choices'];half = '';}
|
||||||
}catch(e){half+=result}
|
}catch(e){half+=result}
|
||||||
if(choices && choices.length>0 && choices[0].logprobs.text_offset[0] > text_offset)
|
if(choices && choices.length>0 && choices[0].logprobs.text_offset[0] > text_offset)
|
||||||
{
|
{
|
||||||
|
@ -1160,8 +1160,8 @@ prev_chat = prev_chat+'<div class="chat_question">'+document.querySelector("#pro
|
||||||
let choices;
|
let choices;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
try{JSON.parse(half+result)['choices'];half = '';}
|
try{choice=JSON.parse(half+result)['choices'];half = '';}
|
||||||
catch(e){JSON.parse(result)['choices'];half = '';}
|
catch(e){choice=JSON.parse(result)['choices'];half = '';}
|
||||||
}catch(e){half+=result}
|
}catch(e){half+=result}
|
||||||
if(choices && choices.length>0 && choices[0].logprobs.text_offset[0] > text_offset)
|
if(choices && choices.length>0 && choices[0].logprobs.text_offset[0] > text_offset)
|
||||||
{
|
{
|
||||||
|
@ -1379,8 +1379,8 @@ fetch("https://search.kg/completions", optionsIntro)
|
||||||
let choices;
|
let choices;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
try{JSON.parse(half+result)['choices'];half = '';}
|
try{choice=JSON.parse(half+result)['choices'];half = '';}
|
||||||
catch(e){JSON.parse(result)['choices'];half = '';}
|
catch(e){choice=JSON.parse(result)['choices'];half = '';}
|
||||||
}catch(e){half+=result}
|
}catch(e){half+=result}
|
||||||
if(choices && choices.length>0 && choices[0].logprobs.text_offset[0] > text_offset)
|
if(choices && choices.length>0 && choices[0].logprobs.text_offset[0] > text_offset)
|
||||||
{
|
{
|
||||||
|
@ -1402,8 +1402,8 @@ fetch("https://search.kg/completions", optionsIntro)
|
||||||
let choices;
|
let choices;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
try{JSON.parse(half+result)['choices'];half = '';}
|
try{choice=JSON.parse(half+result)['choices'];half = '';}
|
||||||
catch(e){JSON.parse(result)['choices'];half = '';}
|
catch(e){choice=JSON.parse(result)['choices'];half = '';}
|
||||||
}catch(e){half+=result}
|
}catch(e){half+=result}
|
||||||
if(choices && choices.length>0 && choices[0].logprobs.text_offset[0] > text_offset)
|
if(choices && choices.length>0 && choices[0].logprobs.text_offset[0] > text_offset)
|
||||||
{
|
{
|
||||||
|
@ -1435,8 +1435,8 @@ fetch("https://search.kg/completions", optionsIntro)
|
||||||
let choices;
|
let choices;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
try{JSON.parse(half+result)['choices'];half = '';}
|
try{choice=JSON.parse(half+result)['choices'];half = '';}
|
||||||
catch(e){JSON.parse(result)['choices'];half = '';}
|
catch(e){choice=JSON.parse(result)['choices'];half = '';}
|
||||||
}catch(e){half+=result}
|
}catch(e){half+=result}
|
||||||
if(choices && choices.length>0 && choices[0].logprobs.text_offset[0] > text_offset)
|
if(choices && choices.length>0 && choices[0].logprobs.text_offset[0] > text_offset)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue