Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Gemini AI v2 #9

Merged
merged 16 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Contributing

Thank you for taking the time to contribute!

## Techstack

Gemini AI is built with the following tools. Ensure you have `bun` [installed](https://bun.sh/).

- [**Bun**](https://bun.sh/) as the package manager
- [**Biome**](https://biomejs.dev/) as the linter and formatter
- [**tsup**](https://tsup.egoist.dev/) as the build tool

Follow the [Github flow](https://docs.github.com/en/get-started/using-github/github-flow) to clone the repo and create a branch.

It is recommended to install Biome integration with your IDE to format your code.

## Scripts

### `bun run build`

Use this to build your project, should you need to test it locally.

It uses `tsup` under the hood.

### `bun run test`

Use this to test your project with existing unit tests. These tests will also be ran on your PR, so ensure they are passing!

It uses `vitest` under the hood.

You can also use `bun run coverage` to check coverage of your tests.

### `bun run check`

Use this to check if your code follows our formatting standards.

It uses Biome under the hood.
330 changes: 238 additions & 92 deletions .github/README.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules
.DS_Store
/coverage
/coverage
/dist
6 changes: 5 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
/coverage
/.github
/test
/bun.lockb
/bun.lockb
/src
tsconfig.json
tsup.config.ts
biome.json
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<img alt="" src="https://img.shields.io/npm/v/gemini-ai.svg?label=NPM&logo=npm&style=for-the-badge&color=0470FF&logoColor=white">
</a>
<a aria-label="NPM Download Count" href="https://www.npmjs.com/package/gemini-ai">
<img alt="" src="https://img.shields.io/npm/dt/gemini-ai?label=Downloads&style=for-the-badge&color=67ACF3">
<img alt="" src="https://img.shields.io/npm/dt/gemini-ai?label=Downloads&style=for-the-badge&color=27B2FF">
</a>
<a aria-label="palm-api Size" href="https://www.npmjs.com/package/gemini-ai">
<img alt="" src="https://img.shields.io/bundlephobia/minzip/gemini-ai?style=for-the-badge&color=F9DBBC">
<a aria-label="Gemini AI Size" href="https://www.npmjs.com/package/gemini-ai">
<img alt="" src="https://img.shields.io/bundlephobia/minzip/gemini-ai?style=for-the-badge&color=B3CAFF">
</a>
</p>
<p align="center">
Expand All @@ -17,7 +17,8 @@

## Quickstart

Make a text request (`gemini-pro`):

Make a text request:

```javascript
import Gemini from "gemini-ai";
Expand All @@ -27,7 +28,7 @@ const gemini = new Gemini(API_KEY);
console.log(await gemini.ask("Hi!"));
```

Make a streaming text request (`gemini-pro`):
Make a streaming text request:

```javascript
import Gemini from "gemini-ai";
Expand All @@ -39,7 +40,7 @@ gemini.ask("Hi!", {
});
```

Chat with Gemini (`gemini-pro`):
Chat with Gemini:

```javascript
import Gemini from "gemini-ai";
Expand Down
Binary file added assets/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 0 additions & 84 deletions assets/[email protected]

This file was deleted.

84 changes: 0 additions & 84 deletions assets/[email protected]

This file was deleted.

2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
}
},
"files": {
"ignore": ["coverage"]
"ignore": ["coverage", "dist"]
}
}
Binary file modified bun.lockb
Binary file not shown.
Loading
Loading