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

bard-ai-google

v1.2.1

Published

A reverse engineered API for Google Bard chatbot

Downloads

89

Readme

Bard-API-Node

Description

bard-api-node is a Node.js library for interacting with Bard, an AI Chatbot developed by Google. Bard is based on Google's Large language model (LLM), LaMDA, which is designed to generate human-like text and images in response to prompts.

What is Bard?

Bard is basically an AI Chatbot developed by Google. It is based on Google’s Large language model (LLM), LaMDA, similar to how ChatGPT is based on GPT. These are types of neural networks that mimic the underlying architecture of the brain in the form of a computer. Bard is separate from Google Search, which is the default way how billions of people look for information on the web. Unlike how a traditional search works, Bard is conversational and allows users to write a prompt and receive human-like text and images generated by artificial intelligence.

In its own description, Bard is a “large language model, also known as a conversational AI or chatbot trained to be informative and comprehensive”. “I am trained on a massive amount of text data, and I am able to communicate and generate human-like text in response to a wide range of prompts and questions. For example, I can provide summaries of factual topics or create stories.”

Installation

To use the Bard-API-Node library in your project, you can install it via npm directly:

npm i bard-ai-google

or can install it via npm from Github:

npm install git+https://github.com/rohit2k3/bard-ai-google.git

Authentication

To authenticate with the Bard API, you need to obtain the session value. Here's how you can get it:

  1. Visit https://bard.google.com/.
  2. Open the browser console by pressing F12.
  3. Go to the "Application" tab.
  4. Under "Cookies", find the cookie named __Secure-1PSID.
  5. Copy the value of the cookie, which will be your session value.

Usage

const google_bard_api = require('bard-ai-google')

const cookie = "jdfvkdfvkdjfvkldfvdfv/dfvdfnvjvdfv."

async function fetchData(query) {
    try {
      const data = await google_bard_api(query, cookie);
      console.log(data);
    } catch (error) {
      console.error("An error occurred:", error);
    }
  }
  
  fetchData("what is google");

Make sure to replace cookie with the actual value of your cookie obtained from the Bard website.

Feedback

I welcome any feedback, bug reports, or problems you may encounter while using this library. If you have any issues or suggestions, please don't hesitate to reach out. You can send your reports to [email protected].

Thank you for your support and feedback!

License

This project is licensed under the MIT License. If you find this project helpful in your own work, I would appreciate a star or acknowledgment in your projects.