[Bug]: Invalid Captcha Response
Author: SelimWalyCreated Jul 31, 2023Updated Aug 1, 2023
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
NoConsole 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
Source: acheong08/EdgeGPT