mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-19 16:31:59 +00:00
updated lite
This commit is contained in:
parent
8f4eaedfd8
commit
2336c3e549
1 changed files with 20 additions and 1 deletions
|
|
@ -7902,7 +7902,7 @@ Current version indicated by LITEVER below.
|
|||
.replace(/\[(.*?)\]\(\)/gm, '<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>')
|
||||
.replace(/\[(.*?)\]\((.*?)\)/gm, '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')
|
||||
|
||||
.replace(/^[\*+-][ .](.*)/gm, "<ul><li>$1</li></ul>")
|
||||
.replace(/^[\*+-][ ](.*)/gm, "<ul><li>$1</li></ul>")
|
||||
.replace(/\%SpcEtg\%(\d\d?)[.](.*)([\n]?)/gm, "\%SpcEtg\%\n$1.$2\n")
|
||||
.replace(/(^\d\d?[ .] .*)\%SpcStg\%/gm, "$1\n\%SpcTemp\%") //fix misalign
|
||||
.replace(/^(\d\d?)[ .] (.*)([\n]??)/gm, function(match, p1, p2) {
|
||||
|
|
@ -25736,6 +25736,25 @@ Current version indicated by LITEVER below.
|
|||
let st = get_instruct_starttag(false);
|
||||
let et = get_instruct_endtag(false);
|
||||
|
||||
let ste = get_instruct_starttag_end(false);
|
||||
let ete = get_instruct_endtag_end(false);
|
||||
let foundpreset = find_matching_instruct_preset(st,et);
|
||||
if(foundpreset && !ete && foundpreset.assistant_end && !ste && foundpreset.user_end)
|
||||
{
|
||||
ete = replaceAll(foundpreset.assistant_end, "\\n", "\n");
|
||||
st = st.replace(ete,"");
|
||||
ste = replaceAll(foundpreset.user_end, "\\n", "\n");
|
||||
et = et.replace(ste,"");
|
||||
if(ete)
|
||||
{
|
||||
input = replaceAll(input, ete, "");
|
||||
}
|
||||
if(ste)
|
||||
{
|
||||
input = replaceAll(input, ste, "");
|
||||
}
|
||||
}
|
||||
|
||||
let turns = repack_instruct_turns(input,st,et,allow_blank);
|
||||
return turns;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue