mirror of
https://github.com/xavidop/cardex.git
synced 2026-08-28 17:01:07 +00:00
fix: API KEY
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
import {genkit} from 'genkit';
|
||||
import {googleAI} from '@genkit-ai/googleai';
|
||||
|
||||
// Validate API key exists
|
||||
const apiKey = process.env.NEXT_PUBLIC_GOOGLE_API_KEY;
|
||||
|
||||
if (!apiKey) {
|
||||
console.error('Missing Google AI API key. Please set GOOGLE_GENAI_API_KEY or GEMINI_API_KEY environment variable.');
|
||||
throw new Error('Google AI API key is required for Genkit configuration');
|
||||
}
|
||||
|
||||
export const ai = genkit({
|
||||
plugins: [googleAI()],
|
||||
model: 'googleai/gemini-2.5-pro-preview-05-06',
|
||||
|
||||
Reference in New Issue
Block a user