Fix streaming server crash

This commit is contained in:
SillyLossy
2023-04-16 12:48:13 +03:00
parent fcc839b56c
commit 6985521b81

View File

@@ -334,7 +334,12 @@ function textGenProcessStartedHandler(websocket, content, session, prompt, fn_in
case "process_generating": case "process_generating":
return { text: content.output.data[0], completed: false }; return { text: content.output.data[0], completed: false };
case "process_completed": case "process_completed":
return { text: content.output.data[0], completed: true }; try {
return { text: content.output.data[0], completed: true };
}
catch {
return { text: '', completed: true };
}
} }
return { text: '', completed: false }; return { text: '', completed: false };