Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acheong08/Bard
Python SDK/API for reverse engineered Google Bard
https://github.com/acheong08/Bard
chatbot google google-bard gpt reverse-engineering
Last synced: 9 days ago
JSON representation
Python SDK/API for reverse engineered Google Bard
- Host: GitHub
- URL: https://github.com/acheong08/Bard
- Owner: acheong08
- License: mit
- Archived: true
- Created: 2023-03-22T13:56:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-26T02:52:48.000Z (over 1 year ago)
- Last Synced: 2024-09-27T04:43:19.884Z (about 1 month ago)
- Topics: chatbot, google, google-bard, gpt, reverse-engineering
- Language: Python
- Homepage:
- Size: 53.7 KB
- Stars: 1,420
- Watchers: 25
- Forks: 178
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- StarryDivineSky - acheong08/Bard
README
# Bard
Reverse engineering of Google's Bard chatbot API## Installation
```bash
$ pip3 install --upgrade GoogleBard
```## Authentication
Go to https://bard.google.com/- F12 for console
- Copy the values
- Session: Go to Application → Cookies → `__Secure-1PSID` and `__Secure-1PSIDTS`. Copy the value of those cookie.## Usage
```bash
$ python3 -m Bard -h
usage: Bard.py [-h] --session <__Secure-1PSID> --session_ts <__Secure-1PSIDTS>options:
-h, --help show this help message and exit
--session --session_ts pass two cookies
```### Quick mode
```
$ export BARD_QUICK="true"
$ export BARD__Secure_1PSID="<__Secure-1PSID>"
$ export BARD__Secure_1PSIDTS="<__Secure-1PSIDTS>"
$ python3 -m Bard
```
Environment variables can be placed in .zshrc.Example bash shortcut:
```bash
# USAGE1: bard QUESTION
# USAGE2: echo "QUESTION" | bard
bard () {
export BARD_QUICK=true
export BARD__Secure_1PSID=<__Secure-1PSID>
export BARD__Secure_1PSIDTS=<__Secure-1PSIDTS>
python3 -m Bard "${@:-$(