Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/EvanZhouDev/gemini-ai
The easiest way to use the powerful Google Gemini model.
https://github.com/EvanZhouDev/gemini-ai
ai gemini google
Last synced: about 2 months ago
JSON representation
The easiest way to use the powerful Google Gemini model.
- Host: GitHub
- URL: https://github.com/EvanZhouDev/gemini-ai
- Owner: EvanZhouDev
- License: gpl-3.0
- Created: 2023-12-14T01:15:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-22T15:06:43.000Z (11 months ago)
- Last Synced: 2024-05-04T23:32:34.314Z (8 months ago)
- Topics: ai, gemini, google
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/gemini-ai
- Size: 1.51 MB
- Stars: 82
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-Google-Gemini-AI - gemini-ai
README
Gemini AI
Welcome to the Gemini era.
## Installation
Install with the following command, or the command for your favorite package manager.
```bash
npm install gemini-ai
```## Quickstart
Make a text request:
```javascript
import Gemini from "gemini-ai";const gemini = new Gemini(API_KEY);
console.log(await gemini.ask("Hi!"));
```Make a streaming text request:
```javascript
import Gemini from "gemini-ai";const gemini = new Gemini(API_KEY);
gemini.ask("Hi!", {
stream: console.log,
});
```Chat with Gemini:
```javascript
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
- [**Installation**](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#installation)
- [**Getting an API Key**](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#getting-an-api-key)
- [**Quickstart**](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#quickstart)
- [**Special Features**](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#special-features)
- [**Documentation**](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#documentation)
- [Initialization](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#inititalization)
- [Method Patterns](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#method-patterns)
- [`Gemini.ask()` Method](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#geminiask)
- [`Gemini.count()` Method](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#geminicount)
- [`Gemini.embed()` Method](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#geminiembed)
- [`Gemini.createChat()` Method](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#geminicreatechat)
- [**FAQ**](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#faq)
- [**Contributors**](https://github.com/EvanZhouDev/gemini-ai?tab=readme-ov-file#contributors)