gemini-ai-typed
v1.3.2
Published
The easiest way to use the powerful Google Gemini model.
Downloads
3
Readme
Quickstart
Make a text request (gemini-pro
):
import Gemini from "gemini-ai";
const gemini = new Gemini(API_KEY);
console.log(await gemini.ask("Hi!"));
Make a streaming text request (gemini-pro
):
import Gemini from "gemini-ai";
const gemini = new Gemini(API_KEY);
gemini.ask("Hi!", {
stream: console.log,
});
Chat with Gemini (gemini-pro
):
import Gemini from "gemini-ai";
const gemini = new Gemini(API_KEY);
const chat = gemini.createChat();
console.log(await chat.ask("Hi!"));
console.log(await chat.ask("What's the last thing I said?"));
Read the full docs at https://github.com/EvanZhouDev/gemini-ai.