From 7d9b7e3d755ce307ad1cbc496b3713cfc87fa7a8 Mon Sep 17 00:00:00 2001 From: lmg-anon <139719567+lmg-anon@users.noreply.github.com> Date: Sun, 29 Dec 2024 01:27:00 -0300 Subject: [PATCH] Fixed chat parsing issue when using Mistral template with system message --- mikupad.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mikupad.html b/mikupad.html index 7e7bc02..4b260b9 100644 --- a/mikupad.html +++ b/mikupad.html @@ -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!");