Skip to content

Commit aa03566

Browse files
committed
fix: open余额也走反代
1 parent 904d494 commit aa03566

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/chat.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,11 +775,11 @@ export class chatgpt extends plugin {
775775

776776
async totalAvailable (e) {
777777
if (!Config.apiKey) {
778-
this.reply('当前未配置OpenAI API key,请在插件配置文件config/config.js中配置。若使用免费的API3则无需关心计费。')
778+
this.reply('当前未配置OpenAI API key,请在锅巴面板或插件配置文件config/config.js中配置。若使用免费的API3则无需关心计费。')
779779
return false
780780
}
781781
// 查询OpenAI API剩余试用额度
782-
fetch('https://api.openai.com/dashboard/billing/credit_grants', {
782+
fetch(`${Config.openAiBaseUrl}/dashboard/billing/credit_grants`, {
783783
method: 'GET',
784784
headers: {
785785
'Content-Type': 'application/json',

utils/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const defaultConfig = {
1414
cacheUrl: 'https://content.alcedogroup.com',
1515
cacheEntry: false,
1616
apiKey: '',
17-
openAiBaseUrl: "https://api.openai.com",
17+
openAiBaseUrl: 'https://api.openai.com',
1818
drawCD: 30,
1919
model: '',
2020
temperature: 0.8,

0 commit comments

Comments
 (0)