ai_v/static/js/config.js

27 lines
978 B
JavaScript
Raw Normal View History

// config.js
const AppConfig = {
API_URL: 'https://ai.comfly.chat/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 "";
}
}
};