feat: support New Bing (GPT-4) (#49, #90)

This commit is contained in:
josc146
2023-03-26 23:29:03 +08:00
parent 6cb8bab762
commit 5d9d3c070f
12 changed files with 672 additions and 37 deletions
+1 -1
View File
@@ -79,8 +79,8 @@ export async function generateAnswersWithCustomApi(port, question, session, apiK
port.onMessage.removeListener(stopListener)
},
async onError(resp) {
if (resp instanceof Error) throw resp
port.onMessage.removeListener(stopListener)
if (resp instanceof Error) throw resp
if (resp.status === 403) {
throw new Error('CLOUDFLARE')
}