Fix continue formatting

This commit is contained in:
ThisIsPIRI
2023-07-12 06:57:05 +09:00
parent 4f11b38110
commit dedb913b67

View File

@@ -2263,9 +2263,9 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
chat2[i] = formatMessageHistoryItem(coreChat[j], isInstruct); chat2[i] = formatMessageHistoryItem(coreChat[j], isInstruct);
// Do not format the message for continuation // Do not suffix the message for continuation
if (i === 0 && type == 'continue') { if (i === 0 && type == 'continue') {
chat2[i] = coreChat[j].mes; chat2[i] = chat2[i].slice(0, chat2[i].lastIndexOf(coreChat[j].mes) + coreChat[j].mes.length);
} }
} }