updated lite
This commit is contained in:
parent
2f51a6afd5
commit
ec1796bec1
1 changed files with 21 additions and 16 deletions
37
klite.embd
37
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.
|
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.
|
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.
|
Kobold Lite is under the AGPL v3.0 License unless otherwise exempted. Please do not remove this line.
|
||||||
Current version: 97
|
Current version: 98
|
||||||
-Concedo
|
-Concedo
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
@ -1670,7 +1670,7 @@ Current version: 97
|
||||||
{
|
{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
resize: none;
|
resize: none;
|
||||||
overflow-y:scroll;
|
/* overflow-y:scroll; */
|
||||||
overflow-x:hidden;
|
overflow-x:hidden;
|
||||||
background: #00000000 none repeat scroll 0 0;
|
background: #00000000 none repeat scroll 0 0;
|
||||||
border: medium none;
|
border: medium none;
|
||||||
|
@ -8711,22 +8711,26 @@ Current version: 97
|
||||||
}
|
}
|
||||||
if(document.getElementById("clauderenamecompat").checked)
|
if(document.getElementById("clauderenamecompat").checked)
|
||||||
{
|
{
|
||||||
|
let assistant_correct_case = "Assistant:";
|
||||||
if(!claude_payload.prompt.toLowerCase().trim().startsWith('human:'))
|
if(!claude_payload.prompt.toLowerCase().trim().startsWith('human:'))
|
||||||
{
|
{
|
||||||
claude_payload.prompt = "Human: "+claude_payload.prompt;
|
claude_payload.prompt = "Human: "+claude_payload.prompt;
|
||||||
}
|
}
|
||||||
if(!claude_payload.prompt.toLowerCase().trim().endsWith('assistant:'))
|
if(!claude_payload.prompt.toLowerCase().trim().endsWith(assistant_correct_case.toLowerCase()))
|
||||||
{
|
{
|
||||||
if(localsettings.opmode==1)
|
if(localsettings.opmode==1)
|
||||||
{
|
{
|
||||||
claude_payload.prompt = claude_payload.prompt + " \nAssistant: Here is a continuation of the story: \nAssistant:";
|
claude_payload.prompt = claude_payload.prompt + " \n"+assistant_correct_case+" Here is a continuation of the story: \n"+assistant_correct_case;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
claude_payload.prompt = claude_payload.prompt + " Assistant:";
|
claude_payload.prompt = claude_payload.prompt + " "+assistant_correct_case;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//trim end
|
||||||
|
claude_payload.prompt = claude_payload.prompt.replace(/[\t\r\n ]+$/, '');
|
||||||
|
//replace final assistant with fixed case
|
||||||
|
claude_payload.prompt = claude_payload.prompt.slice(0, -(assistant_correct_case.length))+assistant_correct_case;
|
||||||
}
|
}
|
||||||
|
|
||||||
last_request_str = JSON.stringify(claude_payload);
|
last_request_str = JSON.stringify(claude_payload);
|
||||||
|
@ -9708,13 +9712,14 @@ Current version: 97
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//strip chunks
|
//strip chunks (optimize for firefox by not constantly modifying dom)
|
||||||
gametext_elem.innerHTML = gametext_elem.innerHTML.replace(/<span class="(.+?)">(.+?)<\/span>/g, "$2");
|
let htmlstr = gametext_elem.innerHTML;
|
||||||
gametext_elem.innerHTML = gametext_elem.innerHTML.replace(/<span class="(.+?)">(.+?)<\/span>/g, "$2");
|
htmlstr = htmlstr.replace(/<span class="(.+?)">(.+?)<\/span>/g, "$2");
|
||||||
gametext_elem.innerHTML = replaceAll(gametext_elem.innerHTML,"<div><br><br><br></div>", "<br><br><br>");
|
htmlstr = htmlstr.replace(/<span class="(.+?)">(.+?)<\/span>/g, "$2");
|
||||||
gametext_elem.innerHTML = replaceAll(gametext_elem.innerHTML,"<div><br><br></div>", "<br><br>");
|
htmlstr = replaceAll(htmlstr,"<div><br><br><br></div>", "<br><br><br>");
|
||||||
gametext_elem.innerHTML = replaceAll(gametext_elem.innerHTML,"<div><br></div>", "<br>");
|
htmlstr = replaceAll(htmlstr,"<div><br><br></div>", "<br><br>");
|
||||||
|
htmlstr = replaceAll(htmlstr,"<div><br></div>", "<br>");
|
||||||
|
gametext_elem.innerHTML = htmlstr;
|
||||||
|
|
||||||
//rather than dump it all into one history, let's split it into paragraphs
|
//rather than dump it all into one history, let's split it into paragraphs
|
||||||
let fullmergedstory = gametext_elem.innerText;
|
let fullmergedstory = gametext_elem.innerText;
|
||||||
|
@ -11409,7 +11414,7 @@ Current version: 97
|
||||||
<div class="">
|
<div class="">
|
||||||
<div id="inputrow" class="">
|
<div id="inputrow" class="">
|
||||||
<div id="inputrowmode" style="padding-right: 4px;">
|
<div id="inputrowmode" style="padding-right: 4px;">
|
||||||
<button type="button" class="btn btn-primary btn-secondary" style="line-height: 1.4;" id="btnmode_adventure" onclick="btn_adventure_mode()">
|
<button type="button" class="btn btn-primary btn-secondary hidden" style="line-height: 1.4;" id="btnmode_adventure" onclick="btn_adventure_mode()">
|
||||||
<img id="adventure_mode_img" class="input_story">
|
<img id="adventure_mode_img" class="input_story">
|
||||||
<br><b id="adventure_mode_txt" style="font-size: 10px;">Story</b>
|
<br><b id="adventure_mode_txt" style="font-size: 10px;">Story</b>
|
||||||
</button>
|
</button>
|
||||||
|
@ -11424,7 +11429,7 @@ Current version: 97
|
||||||
</div>
|
</div>
|
||||||
<div id="inputrowright" style="padding-right: 2px;">
|
<div id="inputrowright" style="padding-right: 2px;">
|
||||||
<button type="button" class="btn btn-secondary wait" id="btnsend" disabled
|
<button type="button" class="btn btn-secondary wait" id="btnsend" disabled
|
||||||
onclick="submit_generation()">Not<br>Conn.</button>
|
onclick="submit_generation()">Loading</button>
|
||||||
<a href="#" id="abortgen" class="hidden bg_black" style="text-align: center;color: #ffaaaa;" onclick="abort_generation()"><b style="display: block;">[ABORT]</b></a>
|
<a href="#" id="abortgen" class="hidden bg_black" style="text-align: center;color: #ffaaaa;" onclick="abort_generation()"><b style="display: block;">[ABORT]</b></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11730,7 +11735,7 @@ Current version: 97
|
||||||
</select>
|
</select>
|
||||||
<input type="checkbox" id="claudeaddversion" onchange="" checked>
|
<input type="checkbox" id="claudeaddversion" onchange="" checked>
|
||||||
<div class="box-label" title="Add endpoint version">Add Endpoint Version</div>
|
<div class="box-label" title="Add endpoint version">Add Endpoint Version</div>
|
||||||
<input type="checkbox" id="clauderenamecompat" onchange="">
|
<input type="checkbox" id="clauderenamecompat" onchange="" checked>
|
||||||
<div class="box-label" title="Rename User and Bot tags to work with claude, force inject them otherwise">Claude Compatibility Rename Fix</div>
|
<div class="box-label" title="Rename User and Bot tags to work with claude, force inject them otherwise">Claude Compatibility Rename Fix</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="palmcustom" class="aidgpopuplistheader anotelabel hidden">
|
<div id="palmcustom" class="aidgpopuplistheader anotelabel hidden">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue