mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: 修改api3出错的信息显示形式
This commit is contained in:
parent
117293cc18
commit
3c5604b2fb
1 changed files with 2 additions and 2 deletions
|
|
@ -90,8 +90,8 @@ export class OfficialChatGPTClient {
|
|||
return await this.sendMessage(prompt, opts)
|
||||
}
|
||||
if (res.status !== 200) {
|
||||
let body = await res.json()
|
||||
throw new Error(JSON.stringify(body, null, 2))
|
||||
let body = await res.text()
|
||||
throw new Error(body)
|
||||
}
|
||||
// todo accept as stream
|
||||
const decoder = new TextDecoder('utf-8')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue