SoraRoseous / ChatSydney-react

帮黑暗大佬暂时维护下,已支持图像生成(需cookie)和图像识别,不过图像识别结果仅在当次对话有效。可以进下面的链接体验一下(建议使用自己的cookie,不填默认是用我的,容易上限),这个地址可能会变动。
https://80c9-38-207-143-112.ngrok-free.app
The Unlicense
81 stars 34 forks source link

How is the code related on replit.com ? #13

Closed Bingchatbot closed 11 months ago

Bingchatbot commented 11 months ago

No detailed instructions on how to run this code on domain ngrok-free.app ?

SoraRoseous commented 11 months ago

It has nothing to do with ngrok, just run it locally or on the server.

Bingchatbot commented 11 months ago

Without cookies, it is impossible to run on the server. So cookies are required for EdgeGPT to work? Did it work with empty cookies before?

SoraRoseous commented 11 months ago

If your IP is not blocked by Microsoft, you can use it without cookies, otherwise you need them.

Bingchatbot commented 11 months ago

Copied the code to replit.com Added Flask Server. Install requirements.txt But doesn't work. Error not visible: Sydney https://replit.com/@dz2023/ChatSydney-react?v=1

SoraRoseous commented 11 months ago

If you are using https connection, you need to change websocket = new WebSocket(ws://${window.location.host}/ws/) to websocket = new WebSocket(wss://${window.location.host}/ws/) in public/index.html

Bingchatbot commented 11 months ago

If you are using https connection, you need to change websocket = new WebSocket(ws://${window.location.host}/ws/) to websocket = new WebSocket(wss://${window.location.host}/ws/) in public/index.html

Thanks for the help! This code was able to run on replit.com Works great! Only two small changes to the code added.

Bingchatbot commented 11 months ago

at error message 200, message='Invalid response status', url=URL('wss://sydney.bing.com/sydney/ChatHub') changed the wss domain in the code like this it remains only to automate the error with captcha

SoraRoseous commented 11 months ago

at error message 200, message='Invalid response status', url=URL('wss://sydney.bing.com/sydney/ChatHub') changed the wss domain in the code like this it remains only to automate the error with captcha

Does Cloudflare provide a fixed or a random IP? If it is fixed, using this IP to send too many requests will still be blocked by Microsoft, but entering the cookie can work normally. If it is random, it will often trigger verification.

Bingchatbot commented 11 months ago

Does Cloudflare provide a fixed or a random IP? If it is fixed, using this IP to send too many requests will still be blocked by Microsoft, but entering the cookie can work normally. If it is random, it will often trigger verification.

I can't fully understand how the code works. But error 200 on replit.com hosting fixes it. Tried to fix ip and random. Didn't notice the difference. Both options sometimes require a captcha. But without this, the code for replit.com does not run. Found this code here point 4.. It helps me now.