feat: extend GEMINI_API_KEY support to include additional keys and update suggestions in exclusions.json
This commit is contained in:
@@ -11,7 +11,6 @@ export async function chat(systemPrompt, userContent) {
|
||||
if (provider === 'claude') headers['anthropic-version'] = '2023-06-01';
|
||||
|
||||
const shuffled = [...apiKeys].sort(() => Math.random() - 0.5);
|
||||
let lastError;
|
||||
for (let i = 0; i < shuffled.length; i++) {
|
||||
if (provider !== 'ollama') headers['Authorization'] = `Bearer ${shuffled[i]}`;
|
||||
try {
|
||||
@@ -22,7 +21,6 @@ export async function chat(systemPrompt, userContent) {
|
||||
);
|
||||
return resp.data.choices[0].message.content;
|
||||
} catch (e) {
|
||||
lastError = e;
|
||||
console.log(` [LLM] key[${i + 1}/${shuffled.length}] 失敗: ${e.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user