refactor: Trim and filter keys in loadLoreBookV3Prompt

This commit is contained in:
kwaroran
2024-05-27 00:46:02 +09:00
parent 161c4bebe8
commit df245159d2

View File

@@ -231,6 +231,7 @@ export async function loadLoreBookV3Prompt(){
fullWordMatching:boolean
}) => {
const sliced = messages.slice(messages.length - arg.searchDepth,messages.length)
arg.keys = arg.keys.map(key => key.trim()).filter(key => key.length > 0)
let mText = sliced.map((msg) => {
return msg.data
}).join('||')