From 09499613f07b68d2aeb42bfeeb394fa8c630e8d2 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Mon, 1 May 2023 21:54:07 -0500 Subject: [PATCH] fix: unofficial api proxy be less strict with json parsing --- src/chatgpt-unofficial-proxy-api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chatgpt-unofficial-proxy-api.ts b/src/chatgpt-unofficial-proxy-api.ts index 57a3b0d..4dd10bf 100644 --- a/src/chatgpt-unofficial-proxy-api.ts +++ b/src/chatgpt-unofficial-proxy-api.ts @@ -218,7 +218,8 @@ export class ChatGPTUnofficialProxyAPI { } } } catch (err) { - reject(err) + console.warn('chatgpt unexpected JSON error', err) + // reject(err) } }, onError: (err) => {