dsdanielpark / Bard-API

The unofficial python package that returns response of Google Bard through cookie value.
https://pypi.org/project/bardapi/
MIT License
5.33k stars 529 forks source link

ask_about_image Not working #284

Closed galihmrd closed 7 months ago

galihmrd commented 7 months ago

Describe the bug I tried using the ask_about_image function, but it doesn't work now.

Version OS: ubuntu Python: 3.11 Bard API: 0.1.40 Using proxy: No

Code

from bardapi import Bard

bard = Bard(token='xxxxxxx')
image = open('image.jpg', 'rb').read() # (jpeg, png, webp) are supported.
bard_answer = bard.ask_about_image('What is in the image?', image)
print(bard_answer['content'])

Error

cannot access local variable 'translated_input_text' where it is not associated with a value
dsdanielpark commented 7 months ago

galihmrd

Hello, Thank you for reporting. We are making modifications to accommodate the new Gemini API. Our goal is to update within 48 hours. However, due to limited access to Gemini at the moment, our progress is delayed. Please bear with us and stay tuned. Alternatively, anyone is welcome to contribute by creating a pull request at any time. Thank you.

dsdanielpark commented 7 months ago

[NOTICE] Please, go to Gemini-API https://github.com/dsdanielpark/Gemini-API

PyPI

Gemini Icon Google - Gemini API

A unofficial Python wrapper, python-gemini-api, operates through reverse-engineering, utilizing cookie values to interact with Google Gemini for users struggling with frequent authentication problems or unable to authenticate via Google Authentication.

Collaborated competently with Antonio Cheong.

What is Gemini?

[Paper] [Official Website] [Official API] [API Documents]

Gemini is a family of generative AI models developed by Google DeepMind that is designed for multimodal use cases. The Gemini API gives you access to the Gemini Pro and Gemini Pro Vision models. In February 2024, Google's Bard service was changed to Gemini.


Installation

pip install python-gemini-api
pip install git+https://github.com/dsdanielpark/Gemini-API.git

For the updated version, use as follows:

pip install -q -U python-gemini-api