updated_api

This commit is contained in:
DivyamAgg24 2025-05-19 22:00:21 +05:30
parent 3ff133c561
commit a373e01356

View File

@ -4,7 +4,9 @@ import prisma from "@repo/db/client";
import authMiddleware from "./middleware";
import { GoogleGenAI } from '@google/genai';
import {SystemPrompt} from "./constant"
import * as dotenv from 'dotenv';
dotenv.config();
const router = express.Router();
// Schema validation for idea creation and updates
@ -109,7 +111,7 @@ router.post("/AIIdeaContent", authMiddleware, async (req: any, res: any) => {
// Create Google Gemini AI instance
const ai = new GoogleGenAI({
apiKey: "AIzaSyAGXspPFiKkmicShhkyuGnUvqxuaWbBtKE",
apiKey: process.env.GEMINI_API_KEY ,
});
const config = {