此版本不维护了,可以使用node版本的,支持session和key两种模式dingtalk-chatgpt-node
The python proxy api repo pygpt didn't work, you can use node version chatgpt-io
-
2022-03-08
- 优化代码,修复代理服务器偶尔connect refused的问题
-
2022-03-03
-
2022-02-14
- 增加docker部署
-
2022-02-10
Uses API by PawanOsman
This is not open source. PawanOsman can see all your requests and your session token.
- DingTalk admin role to create DingTalk bot, how to create a DingTalk bot
- OpenAi ChatGPT session
- install dependencies
pip3 install -r requirements.txt
- Update config.py variables with your own info
- execute script in background
nohup python3 -u index.py > nohup.out 2>&1 &
- watch logs
tail -30f nohup.out
- get docker image and run
docker run -dp 8083:8083 fengcailing/dingtalk-chatgpt-bot:1.0.2
- show docker list and get docker container id
docker ps
- cd docker
docker exec -it <containerId> /bin/sh
- update config.py(GPT_SESSION、APP_SECRET)
- exit docker
exit
- create new iamge
docker commit -m 'update config' <containerId> dingtalk-chatgpt-bot:v1
- stop pre container and run new image
docker stop <containerId> docker run -dp 8083:8083 dingtalk-chatgpt-bot:v1
- watch logs
docker logs -n 30 -f <new containerId>
If you @YourBotName in DingTalk group, it will get ChatGPT answer and reply.
E.g.