mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: API3 error
This commit is contained in:
parent
01892b6ec2
commit
bdd896a11d
1 changed files with 4 additions and 1 deletions
|
|
@ -102,7 +102,10 @@ export class OfficialChatGPTClient {
|
|||
let event = events[i]
|
||||
event = _.trimStart(event, 'data: ')
|
||||
try {
|
||||
fullResponse = JSON.parse(event)
|
||||
let tmp = JSON.parse(event)
|
||||
if (tmp.message) {
|
||||
fullResponse = tmp
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(event)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue