Skip to main content

A package that returns Response of Google BARD through API.

Project description

Development Status :: 4 - Beta

Google BARD API

PyPI package PyPI commit update Code style: black

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
import os

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

Just Give me and them a star.

Reference

[1] https://github.com/acheong08/Bard

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.2.tar.gz (4.0 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.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bardapi-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 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.2.tar.gz
Algorithm Hash digest
SHA256 655ba4dbb81ea8f1c5f81c44f9fdbe4146f432e9255bdde82dfd72e3c782854a
MD5 1332813022a8e6fa4012e03cd490f73f
BLAKE2b-256 2d6b94488531c3f4591f362eb2d039a9e5bf4812223a10483e2bc333b81c4959

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bardapi-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0aae684c339a3a08c86251306d50484b9c887f2bb52f4d47522d2c5b5c3ae858
MD5 2fa607ae803c28c4703708ff47efa2dc
BLAKE2b-256 def569634cb922bdaedc6258e7ffdd608933603c011c0b13c0962ddb3d5f65cc

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