[fix] lorebook formating

This commit is contained in:
kwaroran
2023-05-13 02:59:16 +09:00
parent 9bfbe4c981
commit c7901ca41d
2 changed files with 4 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ jobs:
node-version: 18
- id: set_var
run: |
echo "VERSION_JSON=$(jq -c . < package.json)" >> $GITHUB_ENV
echo "VERSION_JSON=$(jq -c . < version.json)" >> $GITHUB_ENV
- name: install pnpm
uses: pnpm/action-setup@v2
with:

View File

@@ -84,7 +84,7 @@ export async function loadLoreBookPrompt(){
return b.order - a.order
})
const formatedChat = currentChat.slice(currentChat.length - loreDepth,currentChat.length).map((msg) => {
const formatedChatMain = currentChat.slice(currentChat.length - loreDepth,currentChat.length).map((msg) => {
return msg.data
}).join('||').replace(rmRegex,'').toLocaleLowerCase()
@@ -92,6 +92,7 @@ export async function loadLoreBookPrompt(){
while(loreListUpdated){
loreListUpdated = false
const formatedChat = formatedChatMain + activatiedPrompt.join('').replace(rmRegex,'').toLocaleLowerCase()
for(let i=0;i<formatedLore.length;i++){
const lore = formatedLore[i]
if(lore.activatied){