Merge pull request #856 from mweldon/preamble

This commit is contained in:
Cohee
2023-08-03 10:24:31 +03:00
committed by GitHub
5 changed files with 87 additions and 2 deletions

View File

@ -3142,7 +3142,15 @@ function parseTokenCounts(counts, thisPromptBits) {
}
function adjustChatsSeparator(mesSendString) {
if (power_user.custom_chat_separator && power_user.custom_chat_separator.length) {
if (main_api === 'novel') {
let preamble = "\n***\n" + nai_settings.nai_preamble;
if (!preamble.endsWith('\n')) {
preamble += '\n';
}
mesSendString = preamble + mesSendString;
}
else if (power_user.custom_chat_separator && power_user.custom_chat_separator.length) {
mesSendString = power_user.custom_chat_separator + '\n' + mesSendString;
}