mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: api3对话不存在增加提示
This commit is contained in:
parent
6b02beddd8
commit
c1ca4f2f9b
1 changed files with 5 additions and 1 deletions
|
|
@ -91,7 +91,11 @@ export class OfficialChatGPTClient {
|
|||
}
|
||||
if (res.status !== 200) {
|
||||
let body = await res.text()
|
||||
throw new Error(body)
|
||||
if (body.indexOf('Conversation not found') > -1) {
|
||||
throw new Error('对话不存在,请使用指令”#结束对话“结束当前对话后重新开始对话。')
|
||||
} else {
|
||||
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