[fix] authors note not working replacement

This commit is contained in:
kwaroran
2023-09-09 09:01:40 +09:00
parent 5a0547c688
commit 9fa77b26f1

View File

@@ -5,7 +5,7 @@ import { ChatTokenizer, tokenize, tokenizeNum } from "../tokenizer";
import { language } from "../../lang";
import { alertError } from "../alert";
import { loadLoreBookPrompt } from "./lorebook";
import { findCharacterbyId } from "../util";
import { findCharacterbyId, getAuthorNoteDefaultText } from "../util";
import { requestChatData } from "./request";
import { stableDiff } from "./stableDiff";
import { processScript, processScriptFull, risuChatParser } from "./scripts";
@@ -216,6 +216,12 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
content: risuChatParser(currentChat.note, {chara: currentChar})
})
}
else if(getAuthorNoteDefaultText() !== ''){
unformated.authorNote.push({
role: 'system',
content: risuChatParser(getAuthorNoteDefaultText(), {chara: currentChar})
})
}
{
let description = risuChatParser((db.promptPreprocess ? db.descriptionPrefix: '') + currentChar.desc, {chara: currentChar})