The unofficial python package that returns response of Google Bard through cookie value.
conversation_id
as argument of Bard class reusable-session-object
When using the reusable session
as an argument in the Bard class, Bard can remember your previous prompts.
fix-conversation-id-fix-context
When using the reusable session
and conversation_id
as arguments in the Bard class, Bard not only remembers your previous prompts but can also provide consistent responses.
By examining the contents in the response, you can identify several answer candidates with unique conversation_ids. If you find a conversation_id that you prefer, you can pass it as an argument to receive consistent responses from that specific Bard.
To directly execute the Python code received from Bard, set the run_code
argument of Bard class to True
.
Thank you for sharing a valuable use case by R. Navarro.
0.1.15
0.1.15
.During the process of handling images, certain conditional statements have been strengthened to resolve errors. Additionally, versioning issues have been corrected for versions 0.1.11multilang
, 0.1.11multilang2
, 0.1.12
, and 0.1.13
, where they were incorrectly labeled as version 0.1.11
. To address this, version 0.1.14
is being released.
Version 0.1.14
, which is distributed via PyPI, includes the following additions to the 0.1.11
version:
I will update the ChatBard class. The stable version is still 0.1.11. Starting from version 0.1.12, it will be available only on the GitHub dev branch.
from bardapi import ChatBard
chat = ChatBard()
chat.start()
or
from bardapi import ChatBard
import os
os.environ["_BARD_API_KEY"] = 'xxxxxx' # Requird
os.environ["_BARD_API_LANG"] = Arabic # Optional, Default to English
os.environ["_BARD_API_TIMEOUT"] = 30 # Optional, Session Timeout
chat = ChatBard()
chat.start()
0.1.12
Resolved unspecified language error of 0.1.11-multilang
.
To include the GitHub developer version as a dependency package, please use the following tag:
bardapi @ git+https://github.com/dsdanielpark/[email protected]
Note that the PyPI version of bardapi does not include the language argument. However, a better approach is to integrate a separate translation model into the pipeline.
To include the GitHub developer version as a dependency package, please use the following tag:
bardapi @ git+https://github.com/dsdanielpark/[email protected]
Note that the PyPI version of bardapi does not include the language argument. However, a better approach is to integrate a separate translation model into the pipeline.
To view the PyPI installation version of Bard-API, which is version 0.1.11, you can use the following link:
Please note that this version does not include translation functionality and any features related to the googletrans and deep_translator packages. For those functionalities, you will need to install the developer version directly from the official GitHub repository of Bard-API.
I confirmed an error due to variable name pollution during the process of automatically finding tokens in the googletrans package, which I tried to use to support various languages. Therefore, I will keep version 0.1.9 as a development version and revert back to version 0.1.8. For those considering support for various languages, please refer to version 0.1.9.
Version 0.1.10 is the same as version 0.1.8.