[feat] depth promp

This commit is contained in:
kwaroran
2023-11-09 13:49:46 +09:00
parent d4fa526dab
commit 1d5edf710d
6 changed files with 47 additions and 4 deletions

View File

@@ -727,6 +727,16 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
formated = cipherChat(formated)
}
if(currentChar.depth_prompt && currentChar.depth_prompt.prompt.length > 0){
//depth_prompt
const depthPrompt = currentChar.depth_prompt
formated.splice(formated.length - depthPrompt.depth, 0, {
role: 'system',
content: risuChatParser(depthPrompt.prompt, {chara: currentChar})
})
}
{
//token rechecking
let tokens = 0