From 2a7464ad249b5421bc797de6521882d03b613d10 Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Tue, 7 Mar 2023 19:49:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4base?= =?UTF-8?q?url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/config.js | 4 ++-- utils/message.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/utils/config.js b/utils/config.js index 24e0a4f..fc99daf 100644 --- a/utils/config.js +++ b/utils/config.js @@ -1,6 +1,6 @@ import fs from 'fs' import lodash from 'lodash' -export const defaultChatGPTAPI = 'https://apps.openai.com/api/conversation' +export const defaultChatGPTAPI = 'https://pimon.d201.cn/backend-api/conversation' const defaultConfig = { blockWords: ['屏蔽词1', '屏蔽词b'], promptBlockWords: ['屏蔽词1', '屏蔽词b'], @@ -29,7 +29,7 @@ const defaultConfig = { sydneyReverseProxy: 'https://666102.201666.xyz', sydneyForceUseReverse: false, api: defaultChatGPTAPI, - apiBaseUrl: 'https://apps.openai.com/api', + apiBaseUrl: 'https://pimon.d201.cn/backend-api', apiForceUseReverse: false, plus: false, promptPrefixOverride: 'Your answer shouldn\'t be too verbose. Prefer to answer in Chinese.', diff --git a/utils/message.js b/utils/message.js index ffcc905..97bff3d 100644 --- a/utils/message.js +++ b/utils/message.js @@ -80,7 +80,8 @@ export class OfficialChatGPTClient { 'x-openai-assistant-app-id': '', authorization: `Bearer ${this._accessToken}`, 'content-type': 'application/json', - referer: 'https://chat.openai.com/chat' + referer: 'https://chat.openai.com/chat', + library: 'chatgpt-plugin' }, referrer: 'https://chat.openai.com/chat' }