fix: API KEY

This commit is contained in:
xavidop
2025-06-04 17:24:27 +02:00
parent 74fc035ec4
commit 1c873925b1
+8
View File
@@ -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',