aaaaa
/* * Install the Generative AI SDK * * $ npm install @google/generative-ai */ const { GoogleGenerativeAI, HarmCategory, HarmBlockThreshold, } = require("@google/generative-ai"); const apiKey = process.env.GEMINI_API_KEY; const genAI = new GoogleGenerativeAI(apiKey); const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash", }); const generationConfig = { temperature: 1, topP: 0.95, topK: 64, maxOutputTokens: 8192, responseMimeType: "text/plain", }; async function run() { const chatSession = model.startChat({ generationConfig, // safetySettings: Adjust safety settings // See https://ai.google.dev/gemini-api/docs/safety-settings history: [ { role: "user", parts: [ {text: "Using this video, please answer the below questions:\n\n1. Who is the main subject of the video?\n2. List out how Ashley navigated her trip.\n3. At what timestamp did musicians appear playing inst...