dsdanielpark / Bard-API

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

Exception: SNlM0e value not found. Double-check __Secure-1PSID value or pass it as Bard(token='xxxxx') #270

Closed azmwebauto closed 7 months ago

azmwebauto commented 7 months ago

Describe the bug Cookie value correct and package didn`t worked

Version OS: windows 10 Python: 3.10 Using proxy: No

Code

from bardapi import Bard
import os
os.environ['_BARD_API_KEY'] = "fgifPF8s9jY24jWHOX5-rBuBX3qNRvf6W66supYQW9WpvWsErMzKijeewMqOLveRCLXeuw."

res = Bard().get_answer("나와 내 동년배들이 좋아하는 뉴진스에 대해서 알려줘")['content']
print(res)

Error

Exception: SNlM0e value not found. Double-check __Secure-1PSID value or pass it as Bard(token='xxxxx')
dsdanielpark commented 5 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