mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
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:
@@ -87,6 +87,5 @@ module.exports = {
|
||||
console.log();
|
||||
}
|
||||
});
|
||||
},
|
||||
audioEvents: audioEvents
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user