New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

gemini-ai

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gemini-ai

The simpler JavaScript Gemini SDK

latest
Source
npmnpm
Version
2.2.1
Version published
Weekly downloads
3.8K
-4.53%
Maintainers
0
Weekly downloads
 
Created
Source

Gemini AI

Welcome to the Gemini era.

Docs | GitHub | FAQ

Installation

Install with the following command, or the command for your favorite package manager.

npm install gemini-ai

Quickstart

Make a text request:

import Gemini from "gemini-ai";

const gemini = new Gemini(API_KEY);

console.log(await gemini.ask("Hi!"));

Make a streaming text request:

import Gemini from "gemini-ai";

const gemini = new Gemini(API_KEY);

gemini.ask("Hi!", {
	stream: console.log,
});

Chat with Gemini:

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.

Table of Contents

Keywords

google

FAQs

Package last updated on 24 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts