Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

钉钉机器人回复web ChatGPT消息 支持上下文

License

Notifications You must be signed in to change notification settings

XueMeijing/dingtalk-chatgpt-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

此版本不维护了,可以使用node版本的,支持session和key两种模式dingtalk-chatgpt-node

⚠️ This repository is deprecated and no longer maintained!

The python proxy api repo pygpt didn't work, you can use node version chatgpt-io

Change Log

  • 2022-03-08

    • 优化代码,修复代理服务器偶尔connect refused的问题
  • 2022-03-03

    • 使用sqlite3增加上下文功能, @bot /reset 命令会重新打开新聊天窗口 image
  • 2022-02-14

    • 增加docker部署
  • 2022-02-10

    • 机器人名字叫ChatGPT会被禁止使用, 可以换成其他的 image

DingTalk ChatGPT Bot(Unofficial API)

Uses API by PawanOsman

Disclaimer

This is not open source. PawanOsman can see all your requests and your session token.

Prerequisites

Feature

chat conversation context

reset conversation

Usage

python

  1. install dependencies
    pip3 install -r requirements.txt
    
  2. Update config.py variables with your own info
  3. execute script in background
    nohup python3 -u index.py > nohup.out 2>&1 &
    
  4. watch logs
    tail -30f nohup.out
    

docker

  1. get docker image and run
    docker run -dp 8083:8083 fengcailing/dingtalk-chatgpt-bot:1.0.2
    
  2. show docker list and get docker container id
    docker ps
    
  3. cd docker
    docker exec -it <containerId> /bin/sh
    
  4. update config.py(GPT_SESSION、APP_SECRET)
  5. exit docker
    exit
    
  6. create new iamge
    docker commit -m 'update config' <containerId> dingtalk-chatgpt-bot:v1
    
  7. stop pre container and run new image
    docker stop <containerId>
    docker run -dp 8083:8083 dingtalk-chatgpt-bot:v1
    
  8. watch logs
    docker logs -n 30 -f <new containerId>
    

If you @YourBotName in DingTalk group, it will get ChatGPT answer and reply.

E.g.

demo

About

钉钉机器人回复web ChatGPT消息 支持上下文

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published