From 9fa77b26f178e82a16caab62f429f02c0d71f29b Mon Sep 17 00:00:00 2001 From: kwaroran Date: Sat, 9 Sep 2023 09:01:40 +0900 Subject: [PATCH] [fix] authors note not working replacement --- src/ts/process/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ts/process/index.ts b/src/ts/process/index.ts index e9b497b4..273e213e 100644 --- a/src/ts/process/index.ts +++ b/src/ts/process/index.ts @@ -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})