Skip to content

Commit

Permalink
save kai addr
Browse files Browse the repository at this point in the history
  • Loading branch information
Concedo authored and Concedo committed Oct 7, 2023
1 parent 3b4e43a commit 89069a8
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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: 77
Current version: 78
-Concedo
-->

Expand Down Expand Up @@ -3001,7 +3001,8 @@
saved_claude_key: "", //do not ever share this in save files!
saved_claude_addr: "", //do not ever share this in save files!
saved_oai_jailbreak: "", //customized oai system prompt
saved_palm_key: "",
saved_palm_key: "", //do not ever share this in save files!
saved_kai_addr: "", //do not ever share this in save files!

autoscroll: true, //automatically scroll to bottom on render
trimsentences: true, //trim to last punctuation
Expand Down Expand Up @@ -3637,6 +3638,7 @@
story.savedsettings.saved_oai_addr = "";
story.savedsettings.saved_claude_key = "";
story.savedsettings.saved_claude_addr = "";
story.savedsettings.saved_kai_addr = "";

if (!strip_images)
{
Expand Down Expand Up @@ -3756,6 +3758,7 @@
let tmp_claude1 = localsettings.saved_claude_key;
let tmp_claude2 = localsettings.saved_claude_addr;
let tmp_palm1 = localsettings.saved_palm_key;
let tmp_kai = localsettings.saved_kai_addr;
import_props_into_object(localsettings, story.savedsettings);
localsettings.my_api_key = tmpapikey1;
localsettings.home_cluster = tmphc;
Expand All @@ -3764,6 +3767,7 @@
localsettings.saved_claude_key = tmp_claude1;
localsettings.saved_claude_addr = tmp_claude2;
localsettings.saved_palm_key = tmp_palm1;
localsettings.saved_kai_addr = tmp_kai;
}

if (story.savedaestheticsettings && story.savedaestheticsettings != "") {
Expand Down Expand Up @@ -3882,6 +3886,7 @@
loaded_storyobj.savedsettings.saved_oai_addr = "";
loaded_storyobj.savedsettings.saved_claude_key = "";
loaded_storyobj.savedsettings.saved_claude_addr = "";
loaded_storyobj.savedsettings.saved_kai_addr = "";

loaded_storyobj.savedaestheticsettings = JSON.parse(JSON.stringify(aestheticInstructUISettings, null, 2));
}else{
Expand Down Expand Up @@ -4073,6 +4078,7 @@
let tmp_claude1 = localsettings.saved_claude_key;
let tmp_claude2 = localsettings.saved_claude_addr;
let tmp_palm1 = localsettings.saved_palm_key;
let tmp_kai = localsettings.saved_kai_addr;
import_props_into_object(localsettings, loaded_storyobj.savedsettings);
localsettings.my_api_key = tmpapikey1;
localsettings.home_cluster = tmphc;
Expand All @@ -4081,6 +4087,7 @@
localsettings.saved_claude_key = tmp_claude1;
localsettings.saved_claude_addr = tmp_claude2;
localsettings.saved_palm_key = tmp_palm1;
localsettings.saved_kai_addr = tmp_kai;

//backwards compat support for newlines
if(localsettings.instruct_has_newlines==true || (loaded_storyobj.savedsettings != null && loaded_storyobj.savedsettings.instruct_has_newlines==null&&loaded_storyobj.savedsettings.instruct_has_markdown==null))
Expand Down Expand Up @@ -5100,6 +5107,10 @@
if(epchoice==0)
{
document.getElementById("koboldcustom").classList.remove("hidden");
if(!localflag && localsettings.saved_kai_addr!="")
{
document.getElementById("customendpoint").value = localsettings.saved_kai_addr;
}
}
else if(epchoice==1)
{
Expand Down Expand Up @@ -5194,6 +5205,7 @@

//good to go
custom_kobold_endpoint = tmpep;
localsettings.saved_kai_addr = custom_kobold_endpoint;
selected_models = [{ "performance": 100.0, "queued": 0.0, "eta": 0, "name": mdlname, "count": 1 }];
selected_workers = [];
if (perfdata == null) {
Expand Down Expand Up @@ -5554,6 +5566,7 @@
function display_custom_endpoint()
{
document.getElementById("customendpointcontainer").classList.remove("hidden");
customapi_dropdown();
}

function fetch_models(onDoneCallback)
Expand Down

0 comments on commit 89069a8

Please sign in to comment.