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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file bardapi-0.1.1.tar.gz.

File metadata

  • Download URL: bardapi-0.1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for bardapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 222d5131d63d9ba6f723e0cccd90ff82e1ce4de2ba37aef9a0ab06b726bb2cf9
MD5 1bf88cc76facfefe549d68cb7c1264fc
BLAKE2b-256 d906969990a700039f61d4e3310184f659aa79b685af495bbac05622e8768dd1

See more details on using hashes here.

File details

Details for the file bardapi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bardapi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for bardapi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8c45ae63553797395eab7815a9fbac142677d502d3d8387c8dfa1207ae6b49d
MD5 92d3887c450a4338fcac89887510af0b
BLAKE2b-256 0173f371709faac42d6c3a45ce9246dddddb799ea32d3cb7cdd708e2ae173596

See more details on using hashes here.

Supported by

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