Support GPT-4

This commit is contained in:
Rafi
2023-03-27 22:17:19 +08:00
parent f8c2f396c1
commit 8175f199d2
5 changed files with 42 additions and 22 deletions

View File

@@ -90,12 +90,13 @@ const fetchReply = async (message) => {
throw err;
},
async onmessage(message) {
// console.log(message)
const event = message.event
const data = JSON.parse(message.data)
if (event === 'error') {
throw new Error(data.error);
abortFetch()
showSnackbar(data.error)
return;
}
if (event === 'userMessageId') {