enricoros / big-AGI

Generative AI suite powered by state-of-the-art models and providing advanced AI/AGI functions. It features AI personas, AGI functions, multi-model chats, text-to-image, voice, response streaming, code highlighting and execution, PDF import, presets for developers, much more. Deploy on-prem or in the cloud.
https://big-agi.com
MIT License
5.59k stars 1.29k forks source link

Enhanced Gemini API Key Handling (TEST) #646

Closed darthalex2014 closed 1 month ago

darthalex2014 commented 2 months ago

This fork introduces a more flexible way to handle Gemini API keys, allowing users to specify either a single key or a comma-separated list of keys through the existing GEMINI_API_KEY interface field.

Current behavior: The original code only supports a single Gemini API key.

Proposed behavior: If the GEMINI_API_KEY field contains a single value (no commas), it's treated as a single API key. If the GEMINI_API_KEY field contains multiple values separated by commas, it's treated as a list of API keys. The application will randomly select one of these keys for each request to the Gemini API.

Benefits: Increased robustness: Using multiple API keys can help prevent rate limiting issues and ensure uninterrupted access to the Gemini API.

vercel[bot] commented 2 months ago

@darthalex2014 is attempting to deploy a commit to the Enrico Pro Team on Vercel.

A member of the Team first needs to authorize it.

enricoros commented 1 month ago

Great idea @darthalex2014 - this should be a thing