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