gpt4free
gpt4free copied to clipboard
Bing Provider Captcha Issues
Whenever I try using the gpt-4 model with Bing, it says, "CaptchaChallenge: User needs to solve CAPTCHA to continue." Anyway to bypass this?
You can solve the Captcha in your Browser. Open the Bing Website and create a new Conversation. A Captcha should be shown. G4F use automatic the Cookies/Session from your Browser.
Try to pass "fake" cookies:
for response in g4f.ChatCompletion.create(
model=g4f.models.gpt_35_turbo,
provider=g4f.Provider.Bing,
messages=[{"role": "user", "content": "Create me a image with a lion."}],
stream=True,
cookies={"Fake": ""}
):
print(response, end="", flush=True)
print()
Bing then ignores the fake and the browser cookies. Works for me.
It doesn't work on my end...
The fake cookies don't work for me either. I too am getting this issue.
The solution @hlohaus provided works for me.
Try open the developer tools on bing.com in browser and run following js code in the console to get all cookies.
JSON.stringify(document.cookie.split('; ').map(c => c.split('=')).reduce((c, [k, v]) => ({ ...c, [k]: v }), {}))
Then paste the JSON text into the python code to replace {"Fake": ""}