mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
fix: open余额也走反代
This commit is contained in:
parent
904d49489e
commit
aa0356622e
2 changed files with 3 additions and 3 deletions
|
|
@ -775,11 +775,11 @@ export class chatgpt extends plugin {
|
||||||
|
|
||||||
async totalAvailable (e) {
|
async totalAvailable (e) {
|
||||||
if (!Config.apiKey) {
|
if (!Config.apiKey) {
|
||||||
this.reply('当前未配置OpenAI API key,请在插件配置文件config/config.js中配置。若使用免费的API3则无需关心计费。')
|
this.reply('当前未配置OpenAI API key,请在锅巴面板或插件配置文件config/config.js中配置。若使用免费的API3则无需关心计费。')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// 查询OpenAI API剩余试用额度
|
// 查询OpenAI API剩余试用额度
|
||||||
fetch('https://api.openai.com/dashboard/billing/credit_grants', {
|
fetch(`${Config.openAiBaseUrl}/dashboard/billing/credit_grants`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ const defaultConfig = {
|
||||||
cacheUrl: 'https://content.alcedogroup.com',
|
cacheUrl: 'https://content.alcedogroup.com',
|
||||||
cacheEntry: false,
|
cacheEntry: false,
|
||||||
apiKey: '',
|
apiKey: '',
|
||||||
openAiBaseUrl: "https://api.openai.com",
|
openAiBaseUrl: 'https://api.openai.com',
|
||||||
drawCD: 30,
|
drawCD: 30,
|
||||||
model: '',
|
model: '',
|
||||||
temperature: 0.8,
|
temperature: 0.8,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue