ai_v/static/js/config.js
24024 c8d9a7b51c ```
feat(config): 更新AI API配置和密钥

- 更改AI_BASE_URL从https://ai.comfly.chat到https://api.bltcy.ai
- 移除AI_BACKUP_BASE_URL配置
- 更新所有API密钥为新的安全密钥
- 同步更新前端config.js中的API_URL配置
```
2026-04-26 23:32:04 +08:00

27 lines
976 B
JavaScript

// config.js
const AppConfig = {
API_URL: 'https://api.bltcy.ai/v1/chat/completions',
//MODEL: 'gemini-3-pro-preview', // 你要求的模型
//MODEL: 'gemini-2.5-pro',
MODEL: 'gemini-3-flash-preview',
// 这里填入第一步生成的“加密Key”
ENCRYPTED_KEY: "MARAXis7BiwzBDwiLQIjLHNRWwwbWQAKDSFyAiQEYx8iIy8QUHNRAQkoJhMdCRRRWAwJ",
// 解密函数(必须与加密算法对应)
getDecryptedKey: function() {
const salt = "ComflyChatSecret2025"; // 必须与加密时的 Salt 一致
try {
const raw = atob(this.ENCRYPTED_KEY);
let result = "";
for (let i = 0; i < raw.length; i++) {
const charCode = raw.charCodeAt(i) ^ salt.charCodeAt(i % salt.length);
result += String.fromCharCode(charCode);
}
return result;
} catch (e) {
console.error("Key 解密失败");
return "";
}
}
};