Refactor loadLoreBookPrompt function in lorebook.ts
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user