dsdanielpark / Bard-API

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

Exception: Response code not 200. Response Status is 429 #117

Closed Birillox closed 6 months ago

Birillox commented 1 year ago

I got this error when i try to request something to Bard. I tried with new token but nothing..

LucasDarie commented 1 year ago

The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting").

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429

Abhineetnehra commented 12 months ago

Response status 429 is too much frequent after bard's new update. It seems google extensively limited the request count.

basimslam commented 11 months ago

is there a fix to this?

Birillox commented 11 months ago

Just wait about 10-20minutes. If you are using some service like ngrok, just reset all and it s ok

Il Sab 5 Ago 2023, 14:12 Basim Aslam @.***> ha scritto:

is there a fix to this?

— Reply to this email directly, view it on GitHub https://github.com/dsdanielpark/Bard-API/issues/117#issuecomment-1666488660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGLOB6X6PS5AAC5OWDH43TXTY2DLANCNFSM6AAAAAA2NB6WDE . You are receiving this because you authored the thread.Message ID: @.***>

Nipun1212 commented 10 months ago

Hi I recently started facing the same issue, I have a web app on pythonanywhere, and im able to run the chatbot through my own vs code environment, but when I try in my flask application, I get Exception: Response code not 200. Response Status is 429

Birillox commented 10 months ago

Just try to restart all your server/app

Il Dom 27 Ago 2023, 13:12 Nipun Bhatia @.***> ha scritto:

Hi I recently started facing the same issue, I have a web app on pythonanywhere, and im able to run the chatbot through my own vs code environment, but when I try in my flask application, I get Exception: Response code not 200. Response Status is 429

— Reply to this email directly, view it on GitHub https://github.com/dsdanielpark/Bard-API/issues/117#issuecomment-1694638834, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGLOB3HAIJM2SWFUDTQUODXXMTRJANCNFSM6AAAAAA2NB6WDE . You are receiving this because you authored the thread.Message ID: @.***>

Nipun1212 commented 10 months ago

I have restarted it several times, still leading to this error, even refreshed cookies. It just seems to happen on the deployed web app, it seems to work fine on my own Jupyter notebook. Any fix for that?

Nipun1212 commented 10 months ago

Hi, any fixes for this issue, still persists

marcosalvadori commented 10 months ago

Probably no fixes is possible. Google limit the use and there are no possibilities.

Antom91 commented 9 months ago

I only send 5 requests and got the same error :-1:

acon10 commented 9 months ago

I received same error with different account

voccer commented 9 months ago

any update?

acon10 commented 9 months ago

I resolved the issue in my code. Please avoid to use Bard() obj inside loop. I made this mistake. After I define Bard() as global variables(outside loop), my code is fixed.

luoysuan commented 8 months ago

After I changed the proxy ip, I can use it normally again

aakarshh2006 commented 5 months ago

from bardapi import Bard import os

os.environ["_BARD_API_KEY"] = "g.a000gAhy-nPoBCcysK9fKl1k7WDo73jw6XjgjrmVYJTh0HqGWuoS5rdy8ZW9hNCJaQIQH_u11QACgYKAasSAQASFQHGX2MiSTmhMyywDGTmINofYYpNoxoVAUF8yKofFQj67HivGBVSGe9UQ7_a0076."

message = input("ENTER : ") print(Bard().get_answer(str(message)))

using this code and getting the same error of respond status code

acon10 commented 5 months ago

Bard was decommisioned.

Instead you must use Gemini.

Generate your Gemini api key here: https://makersuite.google.com/app/apikey?hl=en

Requirements:

Gemini code sample:

import google.generativeai as genai genai.configure(api_key="YOUR API KEY")
generation_config = {"temperature": 0.9, "top_p": 1, "top_k": 1, "max_output_tokens": 2048} model = genai.GenerativeModel("gemini-pro", generation_config = generation_config) response = model.generate_content("tell me some story") print(response.text)