Add NAI preamble to start of chat buffer

This commit is contained in:
Mike Weldon
2023-08-02 18:22:06 -07:00
parent 14ef5d9a6b
commit 1d0f67c144
3 changed files with 41 additions and 1 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;
}