mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
added Google Generative AI (gemini) integration
This commit is contained in:
@@ -7,11 +7,14 @@ export function getAPIKey(cloudflareEnv: Env, provider: string) {
|
||||
* The `cloudflareEnv` is only used when deployed or when previewing locally.
|
||||
* In development the environment variables are available through `env`.
|
||||
*/
|
||||
|
||||
switch (provider) {
|
||||
case 'Anthropic':
|
||||
return env.ANTHROPIC_API_KEY || cloudflareEnv.ANTHROPIC_API_KEY;
|
||||
case 'OpenAI':
|
||||
return env.OPENAI_API_KEY || cloudflareEnv.OPENAI_API_KEY;
|
||||
case 'Google':
|
||||
return env.GOOGLE_GENERATIVE_AI_API_KEY || cloudflareEnv.GOOGLE_GENERATIVE_AI_API_KEY;
|
||||
case 'Groq':
|
||||
return env.GROQ_API_KEY || cloudflareEnv.GROQ_API_KEY;
|
||||
case 'OpenRouter':
|
||||
|
||||
Reference in New Issue
Block a user