acheong08 / EdgeGPT

Reverse engineered API of Microsoft's Bing Chat AI
The Unlicense
8.08k stars 910 forks source link

v0.1.7 Exception: Authentication failed. You have not been accepted into the beta. #198

Closed plageon closed 1 year ago

plageon commented 1 year ago

Calling edgeGPT API from my AWS EC2 server located in North California. Cookies are provided and _U is included. The error logs are as follows, and I was accepted into the beta.

File "/home/openai/api_caller/edgegpt/views.py", line 9, in chat_bot = Chatbot() File "/home/openai/anaconda3/lib/python3.10/site-packages/EdgeGPT.py", line 319, in init Conversation(self.cookiePath, self.cookies, self.proxy) File "/home/openai/anaconda3/lib/python3.10/site-packages/EdgeGPT.py", line 230, in init raise Exception( Exception: Authentication failed. You have not been accepted into the beta.

Martinzz commented 1 year ago

Sorry, looks like your network settings are preventing access to this feature. AWS dead!!!

plageon commented 1 year ago

Sorry, looks like your network settings are preventing access to this feature. AWS dead!!! image

Exactly the same error occurs when I use Edge browser to access Bing AI. I wonder if this is a problem with my account or my AWS server?

KamiPasi commented 1 year ago

Same with me, but I was able to access it after setting X-Forwarded-For: 1.1.1.1 using the ModHeader plugin in the Edge browser.

plageon commented 1 year ago

Same with me, but I was able to access it after setting X-Forwarded-For: 1.1.1.1 using the ModHeader plugin in the Edge browser.

Thanks a lot. Your solution works for my browser. I guess my AWS server come across a similar problem? Could I apply a similar web plugin on linux system?

exatude commented 1 year ago

I encountered almost the same problem. I use V2rayN, and I can access newbing with browser after setting X-Forwarded-For: 1.1.1.1 . Cookies provided , _U included . And the strangest thing is, it connects successfully twice when I try it for maybe 30 times. My error log:

Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\Tommy\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\EdgeGPT.py", line 489, in asyncio.run(main()) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 649, in run_until_complete return future.result() File "C:\Users\Tommy\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\EdgeGPT.py", line 391, in main bot = Chatbot(proxy=args.proxy) File "C:\Users\Tommy\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\EdgeGPT.py", line 320, in init__ Conversation(self.cookiePath, self.cookies, self.proxy) File "C:\Users\Tommy\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\EdgeGPT.py", line 231, in init raise Exception( Exception: Authentication failed. You have not been accepted into the beta.

acheong08 commented 1 year ago

@exatude I now set x-forwarded-for in the latest version.

exatude commented 1 year ago

@exatude I now set x-forwarded-for in the latest version.

yes, I have latest upgrade before I comment.

acheong08 commented 1 year ago

Can you modify the forwarded IP to 1.1.1.1 and see if that fixes things?

acheong08 commented 1 year ago

Maybe the IP range I used also got blocked

acheong08 commented 1 year ago

(btw I'm using trojan to my server and it works no problem)

exatude commented 1 year ago

Can you modify the forwarded IP to 1.1.1.1 and see if that fixes things?

does that mean change "FORWARDED_IP" directly into "1.1.1.1" ? or setup an environment variable FORWARDED_IP I change "FORWARDED_IP" into "1.1.1.1" now, and that doesn't work...

acheong08 commented 1 year ago

https://github.com/acheong08/EdgeGPT/blob/5f5f6cba4fd422fc15681d721ffc87c05a10d80b/src/EdgeGPT.py#L32-L35

Directly to = 1.1.1.1 since that works for browser?

exatude commented 1 year ago

https://github.com/acheong08/EdgeGPT/blob/5f5f6cba4fd422fc15681d721ffc87c05a10d80b/src/EdgeGPT.py#L32-L35

Directly to = 1.1.1.1 since that works for browser?

1.1.1.1 doesn't work either... maybe some random FORWARDED_IP happens to work

gxqinjh commented 1 year ago

Error: .. File "QEdgeGPT.py", line 258, in init raise Exception( Exception: Authentication failed. You have not been accepted into the beta.

My code: FORWARDED_IP = (

f"13.{random.randint(104, 107)}.{random.randint(0, 255)}.{random.randint(0, 255)}"

f"1.1.1.1"

)

HEADERS_INIT_CONVER = { .... 'x-forwarded-for': '1.1.1.1', }

result:

cookie_file=D:\python\ai\cookie.json Initializing... Me:Hello Bot: Hello! How can I help you today?

GloftOfficial commented 1 year ago

Issue keeps happening on 0.1.11, I have tried both on an oracle cloud instance and aws ec2 with the same issue. Running on my pc works fine I assume because I used my pc to generate the cookie?

exatude commented 1 year ago

strange... I upgrade to 0.1.10 yesterday, and it can't success then. But today it just worked... even without VPN or proxy... WTF?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 2 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 3 days since being marked as stale.