mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-16 20:09:41 +00:00
fix alpaca leak too broad
This commit is contained in:
parent
0dca953d78
commit
bd7a40f326
1 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ Current version indicated by LITEVER below.
|
|||
-->
|
||||
|
||||
<script>
|
||||
const LITEVER = 244;
|
||||
const LITEVER = 245;
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
var localflag = urlParams.get('local'); //this will be replaced automatically in embedded kcpp
|
||||
const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
|
||||
|
@ -16905,9 +16905,9 @@ Current version indicated by LITEVER below.
|
|||
gentxt = trim_extra_stop_seqs(gentxt,false);
|
||||
|
||||
//fix alpaca leakage
|
||||
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")))
|
||||
if(localsettings.fix_alpaca_leak && (localsettings.opmode == 2 || localsettings.opmode == 3 || localsettings.opmode == 4) && (get_instruct_starttag(true).toLowerCase().includes("### instruction")))
|
||||
{
|
||||
let matches = gentxt.match(/\n### (instruction|response)\n|\n### ([^\s]+?):\n/gi);
|
||||
let matches = gentxt.match(/\n### (instruction|response)\n|\n### (instruction|response):\n/gi);
|
||||
for(let m in matches)
|
||||
{
|
||||
let foundStop = gentxt.indexOf(matches[m]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue