Initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
require('dotenv').config();
|
||||
const { GoogleGenAI } = require('@google/genai');
|
||||
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
|
||||
ai.models.generateContent({
|
||||
model: 'gemini-3.6-flash',
|
||||
contents: [
|
||||
'Hello',
|
||||
{
|
||||
inlineData: {
|
||||
data: Buffer.from('hello').toString("base64"),
|
||||
mimeType: 'text/plain'
|
||||
}
|
||||
}
|
||||
],
|
||||
}).then(res => {
|
||||
console.log('Success:', res.text);
|
||||
}).catch(err => {
|
||||
console.error('Error:', err);
|
||||
});
|
||||
Reference in New Issue
Block a user