Refactor loadLoreBookPrompt function in lorebook.ts

This commit is contained in:
kwaroran
2024-04-15 23:58:57 +09:00
parent 706e208f53
commit d93fd7b191

View File

@@ -1796,6 +1796,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
let reader = res.body.getReader()
const decoder = new TextDecoder()
const parser = createParser(async (e) => {
try {
if(e.type === 'event'){
switch(e.event){
case 'content_block_delta': {
@@ -1854,6 +1855,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
}
}
}
} catch (error) {}
})
while(true){
if(rerequesting){