Merge pull request #695 from ThisIsPIRI/continue

Fix continue formatting
This commit is contained in:
Cohee
2023-07-12 11:28:15 +03:00
committed by GitHub

View File

@@ -2265,9 +2265,9 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
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') {
chat2[i] = coreChat[j].mes;
chat2[i] = chat2[i].slice(0, chat2[i].lastIndexOf(coreChat[j].mes) + coreChat[j].mes.length);
}
}