Skip to content

Commit bd7a40f

Browse files
committed
fix alpaca leak too broad
1 parent 0dca953 commit bd7a40f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

klite.embd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Current version indicated by LITEVER below.
1212
-->
1313

1414
<script>
15-
const LITEVER = 244;
15+
const LITEVER = 245;
1616
const urlParams = new URLSearchParams(window.location.search);
1717
var localflag = urlParams.get('local'); //this will be replaced automatically in embedded kcpp
1818
const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
@@ -16905,9 +16905,9 @@ Current version indicated by LITEVER below.
1690516905
gentxt = trim_extra_stop_seqs(gentxt,false);
1690616906

1690716907
//fix alpaca leakage
16908-
if(localsettings.fix_alpaca_leak && (localsettings.opmode == 2 || localsettings.opmode == 3 || localsettings.opmode == 4) && (get_instruct_starttag(true)=="{{[INPUT]}}" || get_instruct_starttag(true).toLowerCase().includes("### instruction")))
16908+
if(localsettings.fix_alpaca_leak && (localsettings.opmode == 2 || localsettings.opmode == 3 || localsettings.opmode == 4) && (get_instruct_starttag(true).toLowerCase().includes("### instruction")))
1690916909
{
16910-
let matches = gentxt.match(/\n### (instruction|response)\n|\n### ([^\s]+?):\n/gi);
16910+
let matches = gentxt.match(/\n### (instruction|response)\n|\n### (instruction|response):\n/gi);
1691116911
for(let m in matches)
1691216912
{
1691316913
let foundStop = gentxt.indexOf(matches[m]);

0 commit comments

Comments
 (0)