[feat] end lorebook param

This commit is contained in:
kwaroran
2023-07-07 07:09:42 +09:00
parent 810a5d4f18
commit d39a7b362f
2 changed files with 24 additions and 2 deletions

View File

@@ -167,7 +167,20 @@ export async function loadLoreBookPrompt(){
}
}
return activatiedPrompt.reverse().join('\n\n')
let sactivated:string[] = []
activatiedPrompt = activatiedPrompt.filter((v) => {
if(v.startsWith("@@@end")){
sactivated.push(v.replace('@@@end','').trim())
return false
}
return true
})
return {
act: activatiedPrompt.reverse().join('\n\n'),
special_act: sactivated.reverse().join('\n\n')
}
}