Skip to content

Commit

Permalink
Fixed chat parsing issue when using Mistral template with system message
Browse files Browse the repository at this point in the history
  • Loading branch information
lmg-anon committed Dec 29, 2024
1 parent 611b101 commit 7d9b7e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mikupad.html
Original file line number Diff line number Diff line change
Expand Up @@ -6305,7 +6305,7 @@
}

function skipToNextKnownPrefix(text, ...prefixes) {
const indices = prefixes.map(prefix => prefix ? regexIndexOf(text, createLenientPrefixRegex(prefix)) : -1).filter(index => index !== -1);
const indices = prefixes.map(prefix => prefix ? regexIndexOf(text, createLenientRegex(prefix)) : -1).filter(index => index !== -1);
const minIndex = indices.length > 0 ? Math.min(...indices) : text.length;
if (minIndex == 0) {
console.warn("Something went wrong!");
Expand Down

0 comments on commit 7d9b7e3

Please sign in to comment.