fix: allow empty api3 token

This commit is contained in:
ikechan8370 2024-05-14 22:58:15 +08:00 committed by GitHub
parent e70f0a79f4
commit 21a15c58ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -415,9 +415,9 @@ class Core {
} else if (use === 'api3') {
// official without cloudflare
let accessToken = await redis.get('CHATGPT:TOKEN')
if (!accessToken) {
throw new Error('未绑定ChatGPT AccessToken请使用#chatgpt设置token命令绑定token')
}
// if (!accessToken) {
// throw new Error('未绑定ChatGPT AccessToken请使用#chatgpt设置token命令绑定token')
// }
this.chatGPTApi = new OfficialChatGPTClient({
accessToken,
apiReverseUrl: Config.api,