refactor persona prompt

This commit is contained in:
kwaroran
2024-07-29 23:40:45 +09:00
parent 9d5b5da351
commit 634056b0cb
3 changed files with 5 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ import { ChatTokenizer, tokenize, tokenizeNum } from "../tokenizer";
import { language } from "../../lang";
import { alertError } from "../alert";
import { loadLoreBookPrompt, loadLoreBookV3Prompt } from "./lorebook";
import { findCharacterbyId, getAuthorNoteDefaultText, getUserName, isLastCharPunctuation, trimUntilPunctuation } from "../util";
import { findCharacterbyId, getAuthorNoteDefaultText, getPersonaPrompt, getUserName, isLastCharPunctuation, trimUntilPunctuation } from "../util";
import { requestChatData } from "./request";
import { stableDiff } from "./stableDiff";
import { processScript, processScriptFull, risuChatParser } from "./scripts";
@@ -372,7 +372,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
if(db.personaPrompt){
unformated.personaPrompt.push({
role: 'system',
content: risuChatParser(db.personaPrompt, {chara: currentChar})
content: risuChatParser(getPersonaPrompt(), {chara: currentChar})
})
}