updated lite

This commit is contained in:
Concedo 2025-05-14 21:17:50 +08:00
parent c5ea7fad93
commit 5c1654f020

View file

@ -3023,6 +3023,7 @@ Current version indicated by LITEVER below.
const dummy_pollinations_key = "kobo";
//for optionally uploading content to share on dpaste
const dpaste_submit_endpoint = "https://dpaste.org/api/";
const dpaste_fetch_endpoint = "https://dpaste.org/";
//support for quick news updates
@ -5822,7 +5823,16 @@ Current version indicated by LITEVER below.
dpurl = `https://${foundDpaste}`
}
}
fetch(`${dpurl}/raw`)
if(foundDpaste.toLowerCase().includes("dpaste.com"))
{
dpurl = `${dpurl}.txt`
}
else
{
dpurl = `${dpurl}/raw`
}
fetch(dpurl)
.then(x => {
if(x.ok)
{
@ -6647,7 +6657,7 @@ Current version indicated by LITEVER below.
console.log("Export Len: " + cstoryjson.length);
const params = new URLSearchParams();
params.append("content", cstoryjson);
params.append("expiry", expiry);
params.append("expires", expiry);
fetch(serverurl, {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
@ -6664,8 +6674,11 @@ Current version indicated by LITEVER below.
})
.then((text) => {
let pasteurl = replaceAll(text,"\"","");
pasteurl = pasteurl.split("/");
pasteurl = pasteurl[pasteurl.length-1];
if(dpaste_submit_endpoint==serverurl)
{
pasteurl = pasteurl.split("/");
pasteurl = pasteurl[pasteurl.length-1];
}
let fullurl = "https://lite.koboldai.net/?dp=" + pasteurl;
document.getElementById("shareasurl").classList.add("hidden");
document.getElementById("shareastext").classList.remove("hidden");
@ -15324,6 +15337,7 @@ Current version indicated by LITEVER below.
"model": custom_oai_model,
"temperature": submit_payload.params.temperature,
"top_p": submit_payload.params.top_p,
"stop": get_stop_sequences().slice(0, 4), //lets try adding stop sequences, limit to first 4
}
if(localsettings.request_logprobs && !targetep.toLowerCase().includes("api.x.ai") && !targetep.toLowerCase().includes("api.mistral.ai"))
{
@ -15460,9 +15474,6 @@ Current version indicated by LITEVER below.
}
}
oai_payload.prompt = submit_payload.prompt;
//lets try adding stop sequences, limit to first 4
oai_payload.stop = get_stop_sequences().slice(0, 4);
}
last_request_str = JSON.stringify(oai_payload);
@ -15734,7 +15745,7 @@ Current version indicated by LITEVER below.
"topP": submit_payload.params.top_p,
"topK": geminitopk,
"candidateCount":1,
"stopSequences": []
"stopSequences": get_stop_sequences().slice(0, 4)
}
};