-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
16 lines (14 loc) · 803 Bytes
/
Copy pathtest.js
File metadata and controls
16 lines (14 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const { GeminiHandler } = require("./lib/engine");
const config = require('./lib/config');
const functions = require('./lib/functions');
(async()=>{
const handler = new GeminiHandler(config.APIKeys);
let response = await handler.generate({model:GeminiHandler.models["gemini-1.0-pro-vision-latest"].name,parts: [{text:"Hello."},{text:"Describes this image!"}],
images: ["https://t3.ftcdn.net/jpg/05/59/27/48/360_F_559274893_O9iSRQwTKIkAooNTglilMgx2yMcXK9Or.jpg"],
functions:functions, safetySettings: config.safetySettings, systemInstruction: [{text:"You are Neuxbane. Developed by Banu Chrisnadi."}]});
console.log(response.text, response.functionCalls);
while(response.next){
response = await handler.generate(response.next);
console.log(response.text, response.functionCalls);
};
})();