npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2024 – Pkg Stats / Ryan Hefner

@ezralazuardy/gem

v0.0.8

Published

πŸ’Ž A more fun way to interact with Gemini.

Downloads

8

Readme

πŸ’Ž gem

A more fun way to interact with Gemini.

await ask("am i deserve better?");

Gem is a simple package that allows you to interact with the Gemini API in a more human-friendly way.

It's like talking to a friend, but in a more professional way. It's simplify the process of sending requests to the Gemini API, so you can focus more on the conversation itself. It's even more simpler than other API wrappers.

🚧 This package is still under heavy development. Beware of breaking changes.

πŸš€ Getting Started

It's only require 3 simple steps to get started.

Install the package

npm install @ezralazuardy/gem

Set the environment variables

GEMINI_API_KEY="<YOUR_GEMINI_API_KEY>"

Ask the Gemini.

import { ask } from "@ezralazuardy/gem";

const response = await ask("what is the weather today?");

console.log(response);

Yup, just like that! Simple, right?

For advanced usage, please read the documentation below.

βš™οΈ Using Specific Model

By default, the model used is gemini-pro. You can change it by setting the GEMINI_MODEL_ID environment variable.

GEMINI_MODEL_ID="gemini-pro"

Please beware of the pricing and capabilities of each model.

As of v0.0.1, the following models are available:

  • gemini-pro (default)
  • gemini-1.5-pro-latest

Plase refer to these references: Gemini API Models, Gemini API Pricing.

πŸš₯ Roadmap

The following features are planned to be implemented in the future.

| Supported | Method | Version | Usage | | --------- | ---------------- | --------- | -------------------------------------------------------- | | 🟒 | ask | v0.0.1+ | Generates text for a given prompt. | | πŸ”΄ | askByStream | - | Streams a text generations. | | πŸ”΄ | object | - | Generates a typed, structured object for a given prompt. | | πŸ”΄ | objectByStream | - | Streams a typed, structured object for a given prompt. |

πŸ“– Documentation

A proper documentation is still in progress πŸ₯²

Written in Typescript. Heavily inspired by Vercel AI and Gemini.