merged Mikes code for the google gemini module

included the requires libraries in the package.json
implemented the library into requires.js
cleaned up ffmpeg from the events
This commit is contained in:
2025-11-24 12:12:46 +01:00
parent 6257ad05a8
commit c2f22b3525
6 changed files with 695 additions and 9 deletions
+1 -5
View File
@@ -1,14 +1,10 @@
const fs = require("fs");
const path = require("path");
const { GoogleGenAI } = require("@google/genai"); // Import Google Gemini AI SDK
const outputDir = path.join(__dirname, "../../../storage/documents"); // path for output directory
if (!fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir, { recursive: true }); // Create output directory if it doesn't exist
}
const ai = new GoogleGenAI({
const ai = new genai.GoogleGenAI({
apiKey: process.env.GOOGLE_API_KEY // Ensure Google API key is set in environment variables: export GOOGLE_API_KEY="your_api_key_here"
});