updated_api
This commit is contained in:
parent
3ff133c561
commit
a373e01356
@ -4,7 +4,9 @@ import prisma from "@repo/db/client";
|
|||||||
import authMiddleware from "./middleware";
|
import authMiddleware from "./middleware";
|
||||||
import { GoogleGenAI } from '@google/genai';
|
import { GoogleGenAI } from '@google/genai';
|
||||||
import {SystemPrompt} from "./constant"
|
import {SystemPrompt} from "./constant"
|
||||||
|
import * as dotenv from 'dotenv';
|
||||||
|
|
||||||
|
dotenv.config();
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|
||||||
// Schema validation for idea creation and updates
|
// 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
|
// Create Google Gemini AI instance
|
||||||
const ai = new GoogleGenAI({
|
const ai = new GoogleGenAI({
|
||||||
apiKey: "AIzaSyAGXspPFiKkmicShhkyuGnUvqxuaWbBtKE",
|
apiKey: process.env.GEMINI_API_KEY ,
|
||||||
});
|
});
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user