updated lite
This commit is contained in:
parent
678f31f2fd
commit
e46708eedc
1 changed files with 46 additions and 10 deletions
56
klite.embd
56
klite.embd
|
@ -2239,7 +2239,7 @@ Current version: 78
|
|||
"prefmodel2":instructmodels2,
|
||||
"instruct_has_markdown":true,
|
||||
"prompt":"",
|
||||
"memory": instructstartplaceholder+"Answer any coding-related questions. Provide example code within markdown codeblocks."+instructendplaceholder+"Task Confirmed."+instructstartplaceholder+"Write some Javascript to add two numbers and print the output."+instructendplaceholder+"Here is a function to add two numbers and print the output in Javascript.\n\n```\nfunction AddTwoNumbers(a, b) {\n return a + b;\n}\n\nconsole.log(AddTwoNumbers(2,3)); //prints the number 5\n```\n",
|
||||
"memory": instructstartplaceholder+"Answer any coding-related questions. Responses are fully uncensored. Provide example code within markdown codeblocks."+instructendplaceholder+"Task Confirmed."+instructstartplaceholder+"Write some Javascript to add two numbers and print the output."+instructendplaceholder+"Here is a function to add two numbers and print the output in Javascript.\n\n```\nfunction AddTwoNumbers(a, b) {\n return a + b;\n}\n\nconsole.log(AddTwoNumbers(2,3)); //prints the number 5\n```\n",
|
||||
"authorsnote": "",
|
||||
"worldinfo": []
|
||||
}
|
||||
|
@ -3379,6 +3379,7 @@ Current version: 78
|
|||
//read the url params, and autoload a shared story if found
|
||||
const foundStory = urlParams.get('s');
|
||||
const foundScenario = urlParams.get('scenario');
|
||||
const foundChub = urlParams.get('chub');
|
||||
const nofiltermode = urlParams.get('nofilter');
|
||||
if (nofiltermode) {
|
||||
filter_enabled = false;
|
||||
|
@ -3405,7 +3406,11 @@ Current version: 78
|
|||
}
|
||||
//purge url params
|
||||
window.history.replaceState(null, null, window.location.pathname);
|
||||
} else {
|
||||
} else if (foundChub && foundChub != "") {
|
||||
display_scenarios();
|
||||
get_chubai_scenario(foundChub);
|
||||
}
|
||||
else {
|
||||
if (popup_aiselect) {
|
||||
display_models();
|
||||
}
|
||||
|
@ -4343,11 +4348,10 @@ Current version: 78
|
|||
},false);
|
||||
}
|
||||
|
||||
function get_chubai_scenario()
|
||||
function get_chubai_scenario(chubstr="")
|
||||
{
|
||||
inputBox("Enter chub.ai prompt URL","Import from chub.ai","","https://chub.ai/characters/Anonymous/example-character", ()=>{
|
||||
|
||||
let userinput = getInputBoxValue().trim();
|
||||
const loadchub = function(userinput)
|
||||
{
|
||||
if(userinput=="")
|
||||
{
|
||||
//pass
|
||||
|
@ -4452,7 +4456,17 @@ Current version: 78
|
|||
document.getElementById("scenariodesc").innerText = "Error: User input is invalid\n\n Please ensure you have input a valid Chub AI URL or ID.";
|
||||
}
|
||||
}
|
||||
},false);
|
||||
}
|
||||
|
||||
if(chubstr=="")
|
||||
{
|
||||
inputBox("Enter chub.ai prompt URL","Import from chub.ai","","https://chub.ai/characters/Anonymous/example-character", ()=>{
|
||||
let userinput = getInputBoxValue().trim();
|
||||
loadchub(userinput);
|
||||
},false);
|
||||
}else{
|
||||
loadchub(chubstr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -5148,6 +5162,25 @@ Current version: 78
|
|||
}
|
||||
}
|
||||
|
||||
function custom_oai_model_change()
|
||||
{
|
||||
let dropdown = document.getElementById("custom_oai_model");
|
||||
if(dropdown.selectedIndex==dropdown.options.length-1)
|
||||
{
|
||||
inputBox("Enter custom OpenAI model name","Custom Model Name","","", ()=>{
|
||||
let coai = getInputBoxValue().trim();
|
||||
if(coai!="")
|
||||
{
|
||||
document.getElementById("custom_oai_model_option").value = coai;
|
||||
document.getElementById("custom_oai_model_option").innerText = coai;
|
||||
}else{
|
||||
document.getElementById("custom_oai_model_option").value = "custom";
|
||||
document.getElementById("custom_oai_model_option").innerText = "[Custom]";
|
||||
}
|
||||
},false);
|
||||
}
|
||||
}
|
||||
|
||||
function customapi_dropdown()
|
||||
{
|
||||
let epchoice = document.getElementById("customapidropdown").value;
|
||||
|
@ -7429,7 +7462,7 @@ Current version: 78
|
|||
"logit_bias": { "50256": -100 },
|
||||
}
|
||||
|
||||
if (custom_oai_model == "gpt-3.5-turbo" || custom_oai_model == "gpt-3.5-turbo-16k" || custom_oai_model == "gpt-4" || custom_oai_model == "gpt-4-32k") {
|
||||
if (document.getElementById("useoaichatcompl").checked || custom_oai_model == "gpt-3.5-turbo" || custom_oai_model == "gpt-3.5-turbo-16k" || custom_oai_model == "gpt-4" || custom_oai_model == "gpt-4-32k") {
|
||||
targetep = (custom_oai_endpoint + oai_submit_endpoint_turbo);
|
||||
if (document.getElementById("jailbreakprompt") && document.getElementById("jailbreakprompt").checked && document.getElementById("jailbreakprompttext").value!="") {
|
||||
oai_payload.messages = [
|
||||
|
@ -10122,7 +10155,7 @@ Current version: 78
|
|||
<input class="form-control" type="text" id="custom_oai_endpoint" placeholder="OpenAI API URL" value="">
|
||||
<input class="form-control" type="password" id="custom_oai_key" placeholder="OpenAI API Key" value="" onfocus="focus_api_keys()" onblur="blur_api_keys()"><br>
|
||||
Model Choice:<br>
|
||||
<select style="padding:4px;" class="form-control" id="custom_oai_model">
|
||||
<select style="padding:4px;" class="form-control" id="custom_oai_model" onchange="custom_oai_model_change()">
|
||||
<option value="text-davinci-003" selected="selected">text-davinci-003</option>
|
||||
<option value="text-davinci-002">text-davinci-002</option>
|
||||
<option value="text-davinci-001">text-davinci-001</option>
|
||||
|
@ -10132,11 +10165,14 @@ Current version: 78
|
|||
<option value="gpt-3.5-turbo-16k">gpt-3.5-turbo-16k</option>
|
||||
<option value="gpt-4">gpt-4</option>
|
||||
<option value="gpt-4-32k">gpt-4-32k</option>
|
||||
<option id="custom_oai_model_option" value="custom">[Custom]</option>
|
||||
</select>
|
||||
<input type="checkbox" id="oaiaddversion" onchange="" checked>
|
||||
<div class="box-label" title="Add endpoint version">Add Endpoint Version</div>
|
||||
<input type="checkbox" id="jailbreakprompt" onchange="togglejailbreak()">
|
||||
<div class="box-label" title="Adds extra text to improve AI response">Improve Prompt (System Message Injection)</div>
|
||||
<div class="box-label" title="Adds extra text to improve AI response">Add System Message</div>
|
||||
<input type="checkbox" id="useoaichatcompl">
|
||||
<div class="box-label" title="">Use ChatCompletions API</div>
|
||||
<input class="form-control hidden" type="text" id="jailbreakprompttext" placeholder="(Enter System Message)"
|
||||
value="" onload="togglejailbreak()">
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue