File size: 458 Bytes
659d28c | 1 2 3 4 5 6 7 8 9 10 11 12 | // core/aiConfig.js
const { GoogleGenerativeAI } = require("@google/generative-ai");
// Khởi tạo Google AI với API Key từ file .env
const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY);
// Cấu hình Model Gemma 3 (Hoặc Gemini tùy theo key của Đạt)
const model = genAI.getGenerativeModel({
model: "gemini-1.5-flash", // Hoặc "gemma-3-flash" nếu Đạt đã có quyền truy cập sớm
});
module.exports = { model }; |