A package that returns Response of Google BARD through API.
Project description
Development Status :: 4 - Beta
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
- Visit https://bard.google.com/
- F12 for console
- 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
Project details
Release history Release notifications | RSS feed
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 hashes)