From 84eeecb8895c811533375963946618ee4beb41f2 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Fri, 6 Oct 2023 23:15:11 +0800 Subject: [PATCH] updated lite --- klite.embd | 74 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 12 deletions(-) diff --git a/klite.embd b/klite.embd index 7e33d6fca..fa0f955c6 100644 --- a/klite.embd +++ b/klite.embd @@ -6,7 +6,7 @@ It requires no dependencies, installation or setup. Just copy this single static HTML file anywhere and open it in a browser, or from a webserver. Please go to https://github.com/LostRuins/lite.koboldai.net for updates on Kobold Lite. Kobold Lite is under the AGPL v3.0 License unless otherwise exempted. Please do not remove this line. -Current version: 76 +Current version: 77 -Concedo --> @@ -4700,6 +4700,22 @@ Current version: 76 } get_workers((wdata) => { worker_data_showonly = wdata; + + //preprocess the showonly data for extra fields + for (var i = 0; i < worker_data_showonly.length; ++i) { + let elem = worker_data_showonly[i]; + let tokenspersec = elem.performance.replace(" tokens per second", ""); + if(tokenspersec.toLowerCase()=="no requests fulfilled yet") + { + tokenspersec = 0; + } + worker_data_showonly[i].tokenspersec = parseFloat(tokenspersec); + if(elem.models.length>0) + { + worker_data_showonly[i].defaultmodel = elem.models[0]; + } + } + show_workers(); }); } @@ -4774,6 +4790,31 @@ Current version: 76 return days+"d "+hours+"h "+minutes+"m"; } + var sortworkersdisplayasc = true; + var lastsortworkerkey = ""; + function sort_display_workers(sortkey) + { + sortworkersdisplayasc = !sortworkersdisplayasc; + if(lastsortworkerkey!=sortkey) + { + sortworkersdisplayasc = true; + } + lastsortworkerkey = sortkey; + worker_data_showonly.sort(function(a, b) { + if(sortworkersdisplayasc) + { + if(a[sortkey] < b[sortkey]) { return -1; } + if(a[sortkey] > b[sortkey]) { return 1; } + return 0; + }else{ + if(a[sortkey] < b[sortkey]) { return 1; } + if(a[sortkey] > b[sortkey]) { return -1; } + return 0; + } + }); + show_workers(); + } + function show_workers() { document.getElementById("workercontainer").classList.remove("hidden"); @@ -6937,10 +6978,19 @@ Current version: 76 pending_context_preinjection = "\n"; } - if(localsettings.allow_continue_chat && newgen.trim() == "") + if(localsettings.allow_continue_chat && newgen.trim() == "" && co!="") { - //allow continuing a previous bot reply instead of starting a new row. - pending_context_preinjection = ""; + //determine if the most recent speaker is ourself + let last_self = Math.max(truncated_context.lastIndexOf(me + ":"),truncated_context.lastIndexOf("\n"+me)); + let last_oppo = truncated_context.lastIndexOf(co+":"); + + if (last_oppo > -1 && last_oppo > last_self) { + //allow continuing a previous bot reply instead of starting a new row. + pending_context_preinjection = ""; + } else { + //start a new bot response + truncated_context += pending_context_preinjection; + } } else { @@ -10053,7 +10103,7 @@ Current version: 76 class="helptext">Randomness of sampling. High values can increase creativity but may make text less sensible. Lower values will make text more predictable but can become repetitious. - @@ -10116,7 +10166,7 @@ Current version: 76
Name | Model | Capabilities | Uptime | Kudos | Cluster |
---|---|---|---|---|---|
Name | Model | Capabilities | Uptime | Kudos | Cluster |