Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

[Bug]: Invalid Captcha Response #633

Open
1 task done
SelimWaly opened this issue Jul 31, 2023 · 4 comments
Open
1 task done

[Bug]: Invalid Captcha Response #633

SelimWaly opened this issue Jul 31, 2023 · 4 comments

Comments

@SelimWaly
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

User needs to solve CAPTCHA to continue

I used to have a running script that used to work but now no longer works:

from EdgeGPT import Chatbot, ConversationStyle

bot = Chatbot(cookiePath='./cookies.json')
response = await bot.ask(prompt=prompt, conversation_style=ConversationStyle.balanced)
            for message in response["item"]["messages"]:
                if message["author"] == "bot":
                    bot_response = message["text"]
            bot_response = re.sub('\[\^\d+\^\]', '', bot_response)
            print("Bot: " + bot_response)
            

Now I updated my function and I get the response "User needs to solve CAPTCHA challenge" which I am unable to solve through a Python script:

import asyncio, json
from EdgeGPT.EdgeGPT import Chatbot, ConversationStyle

async def main():
    bot = await Chatbot.create() # Passing cookies is "optional", as explained above
    response = await bot.ask(prompt="Hello world", conversation_style=ConversationStyle.creative, simplify_response=True)
    print(json.dumps(response, indent=2)) # Returns
    """
{
    "text": str,
    "author": str,
    "sources": list[dict],
    "sources_text": str,
    "suggestions": list[str],
    "messages_left": int
}
    """
    await bot.close()

if __name__ == "__main__":
    asyncio.run(main())

Steps to reproduce the problem

Not exactly sure.

What should have happened?

The Bing AI response should have been printed into the console.

Version where the problem happens

Latest version (0.12.1)

What Python version are you running this with?

3.10.10

What is your operating system ?

Windows

Command Line Arguments

No

Console logs

Traceback (most recent call last):
  File "d:\GPT Prompt Analysis\3.py", line 21, in <module>
    asyncio.run(main())
  File "C:\Users\CM\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\CM\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
  File "d:\GPT Prompt Analysis\3.py", line 6, in main
    response = await bot.ask(prompt="Hello world", conversation_style=ConversationStyle.creative, simplify_response=True)
  File "C:\Users\CM\AppData\Local\Programs\Python\Python310\lib\site-packages\EdgeGPT\EdgeGPT.py", line 116, in ask
    async for final, response in self.chat_hub.ask_stream(
  File "C:\Users\CM\AppData\Local\Programs\Python\Python310\lib\site-packages\EdgeGPT\chathub.py", line 203, in ask_stream
    raise Exception(
Exception: CaptchaChallenge: User needs to solve CAPTCHA to continue.

Additional information

No response

@Seminko
Copy link

Seminko commented Jul 31, 2023

Same issue here. Captcha all the time.

@AlriAlri
Copy link

Using a new set of cookies worked for me (but the Captcha issue reapear, if i use the chat too frequently, then a wait is neccessery).

@SelimWaly
Copy link
Author

I used to run it before as much as I want without any time waits.

@AzenKain
Copy link

AzenKain commented Aug 1, 2023

I have the same problem with the captcha, captcha anywhere

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants