Skip to main content

A package that returns Response of Google BARD through API.

Project description

Google BARD API

A package that returns Response of Google BARD through API

I referred to the GitHub repository where inference process of BARD was reverse engineered. Using __Secure-1PSID, you can ask questions and get answers from Google BARD. This package is designed for application to the Python package ExceptNotifier.


Install

The latest stable release (and required dependencies) can be installed from PyPI:

pip install bardapi

You may instead want to use the development version from Github:

pip install git+https://github.com/dsdanielpark/BARD_API.git

Authentication

  1. Visit https://bard.google.com/
  2. F12 for console
  3. Session: Application → Cookies → Copy the value of __Secure-1PSID cookie.

Usage

Simple Usage

from bardapi import Bard

os.environ['_BARD_API_KEY']="xxxxxxxx."
Bard().get_answer("What is Google BARD????")['content']

Or you can use this

import bardapi
import os

# set your __Secure-1PSID value to key
os.environ['_BARD_API_KEY']="xxxxxxxx."

# set your input text
input_text = "What is Google Bard???"

# Send an API request and get a response.
response = bardapi.core.Bard().get_answer(input_text)

License

:star2: Just Give me and them a star :stars:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bardapi-0.1.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

bardapi-0.1.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page