MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / main

Function main

scripts/test-gemini.js:147–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145
146// 运行测试
147async function main() {
148 console.log('🚀 Gemini API 测试工具');
149 console.log('=' .repeat(50));
150
151 const success = await testGeminiAPI();
152
153 console.log('\n' + '='.repeat(50));
154 if (success) {
155 console.log('🎉 测试通过!API Key 有效且可以正常使用');
156 console.log('\n下一步:');
157 console.log('1. 确认 GitHub Actions 中的 Secret 值与此 Key 一致');
158 console.log('2. 检查 Actions 运行日志中的详细错误信息');
159 console.log('3. 可能需要在 Actions 环境中配置代理');
160 } else {
161 console.log('❌ 测试失败!请检查上述错误信息');
162 console.log('\n建议:');
163 console.log('1. 访问 https://makersuite.google.com/app/apikey 重新生成 Key');
164 console.log('2. 确保在 Google Cloud Console 中启用了 Generative Language API');
165 console.log('3. 检查项目是否有有效的计费账户');
166 }
167}
168
169main();

Callers 1

test-gemini.jsFile · 0.70

Calls 1

testGeminiAPIFunction · 0.85

Tested by

no test coverage detected