This commit is contained in:
Joseph Cheung 2023-03-02 13:49:33 +08:00
parent 4892392d72
commit a5884843b2
2 changed files with 14 additions and 0 deletions

View file

@ -1363,6 +1363,7 @@ function modal_open(url, num)
if (done) return; if (done) return;
const text = new TextDecoder('utf-8').decode(value); const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) { text.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -1698,6 +1699,7 @@ prev_chat = prev_chat+'<div class="chat_question">'+document.querySelector("#pro
if (done) return; if (done) return;
const text = new TextDecoder('utf-8').decode(value); const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) { text.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -1819,6 +1821,7 @@ prev_chat = prev_chat+'<div class="chat_question">'+document.querySelector("#pro
if (done) return; if (done) return;
const text = new TextDecoder('utf-8').decode(value); const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) { text.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -1907,6 +1910,7 @@ prev_chat = prev_chat+'<div class="chat_question">'+document.querySelector("#pro
if (done) return; if (done) return;
const text = new TextDecoder('utf-8').decode(value); const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) { text.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -2080,6 +2084,7 @@ fetch("https://search.kg/completions", optionsIntro)
if (done) return; if (done) return;
const textIntro = new TextDecoder('utf-8').decode(value); const textIntro = new TextDecoder('utf-8').decode(value);
textIntro.trim().split('\n').forEach(function(v) { textIntro.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -2100,6 +2105,7 @@ fetch("https://search.kg/completions", optionsIntro)
if (done) return; if (done) return;
const text = new TextDecoder('utf-8').decode(value); const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) { text.trim().split('\n').forEach(function(v) {
result=''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -2128,6 +2134,7 @@ fetch("https://search.kg/completions", optionsIntro)
if (done) return; if (done) return;
const textPlusComment = new TextDecoder('utf-8').decode(value); const textPlusComment = new TextDecoder('utf-8').decode(value);
textPlusComment.trim().split('\n').forEach(function(v) { textPlusComment.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {

View file

@ -1363,6 +1363,7 @@ function modal_open(url, num)
if (done) return; if (done) return;
const text = new TextDecoder('utf-8').decode(value); const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) { text.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -1698,6 +1699,7 @@ prev_chat = prev_chat+'<div class="chat_question">'+document.querySelector("#pro
if (done) return; if (done) return;
const text = new TextDecoder('utf-8').decode(value); const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) { text.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -1819,6 +1821,7 @@ prev_chat = prev_chat+'<div class="chat_question">'+document.querySelector("#pro
if (done) return; if (done) return;
const text = new TextDecoder('utf-8').decode(value); const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) { text.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -1907,6 +1910,7 @@ prev_chat = prev_chat+'<div class="chat_question">'+document.querySelector("#pro
if (done) return; if (done) return;
const text = new TextDecoder('utf-8').decode(value); const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) { text.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -2080,6 +2084,7 @@ fetch("https://search.kg/completions", optionsIntro)
if (done) return; if (done) return;
const textIntro = new TextDecoder('utf-8').decode(value); const textIntro = new TextDecoder('utf-8').decode(value);
textIntro.trim().split('\n').forEach(function(v) { textIntro.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -2100,6 +2105,7 @@ fetch("https://search.kg/completions", optionsIntro)
if (done) return; if (done) return;
const text = new TextDecoder('utf-8').decode(value); const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) { text.trim().split('\n').forEach(function(v) {
result=''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {
@ -2128,6 +2134,7 @@ fetch("https://search.kg/completions", optionsIntro)
if (done) return; if (done) return;
const textPlusComment = new TextDecoder('utf-8').decode(value); const textPlusComment = new TextDecoder('utf-8').decode(value);
textPlusComment.trim().split('\n').forEach(function(v) { textPlusComment.trim().split('\n').forEach(function(v) {
result = ''
if(v.length>6) result = v.slice(6); if(v.length>6) result = v.slice(6);
if(result == "[DONE]") if(result == "[DONE]")
{ {