欢迎到slack来tree new bing。https://join.slack.com/t/chatsydneycomminicate/shared_invite/zt-1x7tjzgdz-v71xazsoE206kJwFuyf1rA
中国用户请设置能翻墙的系统代理 Chinese users, please set up a system proxy that can bypass the GFW.
使用的时候最好添加cookies.json文件。
First, you need to have Python 3.11 or higher installed. Then, you can install the required dependencies using pip:
pip install -r requirements.txt --upgradesame as EdgeGPT https://github.com/acheong08/EdgeGPT#getting-authentication-required
After saving cookies.json in current directory, you can run this project using the Python command line:
python main.pyThen, you can open http://localhost:65432 in your browser to start chatting.
--hostor-H: The hostname and port for the server, default islocalhost:65432.--proxyor-p: Proxy address, likehttp://localhost:7890, default is to use urllib to get proxy
The WebSocket API accepts a JSON object containing the following fields:
message: The user's message.context: The context of the conversation, can be any string.
The WebSocket API returns a JSON object containing the following fields:
type: The type of the message, can be the type from Bing response orerror.message: The response from EdgeGPT.error: If an error occurs, this field will contain the error message.
If you want to deploy to the server, and use https protocol to access, then 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