Skip to content

Commit 5c1654f

Browse files
committed
updated lite
1 parent c5ea7fa commit 5c1654f

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

klite.embd

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3023,6 +3023,7 @@ Current version indicated by LITEVER below.
30233023
const dummy_pollinations_key = "kobo";
30243024

30253025
//for optionally uploading content to share on dpaste
3026+
const dpaste_submit_endpoint = "https://dpaste.org/api/";
30263027
const dpaste_fetch_endpoint = "https://dpaste.org/";
30273028

30283029
//support for quick news updates
@@ -5822,7 +5823,16 @@ Current version indicated by LITEVER below.
58225823
dpurl = `https://${foundDpaste}`
58235824
}
58245825
}
5825-
fetch(`${dpurl}/raw`)
5826+
5827+
if(foundDpaste.toLowerCase().includes("dpaste.com"))
5828+
{
5829+
dpurl = `${dpurl}.txt`
5830+
}
5831+
else
5832+
{
5833+
dpurl = `${dpurl}/raw`
5834+
}
5835+
fetch(dpurl)
58265836
.then(x => {
58275837
if(x.ok)
58285838
{
@@ -6647,7 +6657,7 @@ Current version indicated by LITEVER below.
66476657
console.log("Export Len: " + cstoryjson.length);
66486658
const params = new URLSearchParams();
66496659
params.append("content", cstoryjson);
6650-
params.append("expiry", expiry);
6660+
params.append("expires", expiry);
66516661
fetch(serverurl, {
66526662
method: 'POST',
66536663
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
@@ -6664,8 +6674,11 @@ Current version indicated by LITEVER below.
66646674
})
66656675
.then((text) => {
66666676
let pasteurl = replaceAll(text,"\"","");
6667-
pasteurl = pasteurl.split("/");
6668-
pasteurl = pasteurl[pasteurl.length-1];
6677+
if(dpaste_submit_endpoint==serverurl)
6678+
{
6679+
pasteurl = pasteurl.split("/");
6680+
pasteurl = pasteurl[pasteurl.length-1];
6681+
}
66696682
let fullurl = "https://lite.koboldai.net/?dp=" + pasteurl;
66706683
document.getElementById("shareasurl").classList.add("hidden");
66716684
document.getElementById("shareastext").classList.remove("hidden");
@@ -15324,6 +15337,7 @@ Current version indicated by LITEVER below.
1532415337
"model": custom_oai_model,
1532515338
"temperature": submit_payload.params.temperature,
1532615339
"top_p": submit_payload.params.top_p,
15340+
"stop": get_stop_sequences().slice(0, 4), //lets try adding stop sequences, limit to first 4
1532715341
}
1532815342
if(localsettings.request_logprobs && !targetep.toLowerCase().includes("api.x.ai") && !targetep.toLowerCase().includes("api.mistral.ai"))
1532915343
{
@@ -15460,9 +15474,6 @@ Current version indicated by LITEVER below.
1546015474
}
1546115475
}
1546215476
oai_payload.prompt = submit_payload.prompt;
15463-
15464-
//lets try adding stop sequences, limit to first 4
15465-
oai_payload.stop = get_stop_sequences().slice(0, 4);
1546615477
}
1546715478

1546815479
last_request_str = JSON.stringify(oai_payload);
@@ -15734,7 +15745,7 @@ Current version indicated by LITEVER below.
1573415745
"topP": submit_payload.params.top_p,
1573515746
"topK": geminitopk,
1573615747
"candidateCount":1,
15737-
"stopSequences": []
15748+
"stopSequences": get_stop_sequences().slice(0, 4)
1573815749
}
1573915750
};
1574015751

0 commit comments

Comments
 (0)