-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CaptchaError: Bing: Retry: CaptchaChallenge: User needs to solve CAPTCHA to continue. #1955
Comments
You don't need cookies for Bing, but if you do add some, you should add all of them and maybe solve the captcha in the browser. |
@hlohaus even without cookies, I too am getting the same error. I have updated the library to the latest version. According to me, for conversation, Bing shouldn't need any cookies. It will still need them for image generation though. |
This is my code. Pretty simple and just for an initial test of the library's working import g4f
prompt = "Hello"
completion = g4f.ChatCompletion.create(
model=g4f.models.gpt_4,
messages=[{"role": "user", "content": prompt}],
)
print(completion) The installations I did:
Python version: 3.12.3 The error I got was:
|
When the default cookies don't work, try passing your own cookies. Also, you should pass the captcha in this session. I don't need to solve a captcha with my IP address. |
I tried passing my own cookies as well (multiple times from different accounts, in fact!) This is the code: from g4f.client import Client
from g4f import Provider, models
from g4f import set_cookies
client = Client()
set_cookies('.bing.com', {
'_U': '[BING_COOKIES]'
})
conversation = []
conversation.append({'role': 'user', 'content': 'Hello, how are you?'})
completion = client.chat.completions.create(
model=models.gpt_4,
messages=conversation,
ignored=["Ylokh", "GptGo", "AItianhu", "Aibn", "Myshell", "FreeGpt" ],
)
print(completion.choices[0].message.content) I got this error, which I don't think is any different from the one I got earlier:
I have also updated the library to the latest version (0.3.1.6) I also have a |
@hlohaus About the captcha challenge you talked about; I cannot see any captcha in my browser. I have used the |
You need to pass the cookies as a dictionary here in Bing:
It doesn't use the get_cookies function. You could use it to pass the cookies from file:
|
Well, I added this line to the chat completion function: Still, I get the exact same error |
@hlohaus Hey, it started working somehow. cheers! But now there is the issue that it does not work with
Any idea on how to fix this? |
This error appears to be related to a DNS resolution issue. It is possible that there is a problem with your internet connection or DNS settings. |
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again. |
Is this problem solved? |
I started getting 'An error occured: Bing: RateLimitError: CaptchaChallenge: Use other cookies or/and ip address' for Bing not a long ago. This problem persists. |
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again. |
Closing due to inactivity. |
Bug description
When utilizing GPT-4 Turbo through Bing in async mode and with the parameter cookies={"_U":"my_cookies_from_Bing_here"}, the error "Bing: Retry: CaptchaChallenge: User needs to solve CAPTCHA to continue" frequently appears.
Screenshots
Environment
The text was updated successfully, but these errors were encountered: