From aa0356622ea6218e0fac9aad35a2020c45f99348 Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Thu, 2 Mar 2023 22:18:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20open=E4=BD=99=E9=A2=9D=E4=B9=9F=E8=B5=B0?= =?UTF-8?q?=E5=8F=8D=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/chat.js | 4 ++-- utils/config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/chat.js b/apps/chat.js index cadd9a1..ed3e5ba 100644 --- a/apps/chat.js +++ b/apps/chat.js @@ -775,11 +775,11 @@ export class chatgpt extends plugin { async totalAvailable (e) { if (!Config.apiKey) { - this.reply('当前未配置OpenAI API key,请在插件配置文件config/config.js中配置。若使用免费的API3则无需关心计费。') + this.reply('当前未配置OpenAI API key,请在锅巴面板或插件配置文件config/config.js中配置。若使用免费的API3则无需关心计费。') return false } // 查询OpenAI API剩余试用额度 - fetch('https://api.openai.com/dashboard/billing/credit_grants', { + fetch(`${Config.openAiBaseUrl}/dashboard/billing/credit_grants`, { method: 'GET', headers: { 'Content-Type': 'application/json', diff --git a/utils/config.js b/utils/config.js index db4387f..4f6defb 100644 --- a/utils/config.js +++ b/utils/config.js @@ -14,7 +14,7 @@ const defaultConfig = { cacheUrl: 'https://content.alcedogroup.com', cacheEntry: false, apiKey: '', - openAiBaseUrl: "https://api.openai.com", + openAiBaseUrl: 'https://api.openai.com', drawCD: 30, model: '', temperature: 0.8,