Giter VIP home page Giter VIP logo

dingtalk-chatgpt-bot's Introduction

此版本不维护了,可以使用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

dingtalk-chatgpt-bot's People

Contributors

xuemeijing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dingtalk-chatgpt-bot's Issues

Connection refused by the server

已经成功对话n轮,大约5分钟后钉钉开始显示请求接口失败 请稍后重试

根据后台记录

....
 'text': {'content': '可以开始对话了吗'}, 'robotCode': 'ding2g***', 'msgtype': 'text'}
签名验证成功-----
retry_count 1
error
 ConnectionError('Connection refused by the server')
retry_count 2
error
 ConnectionError('Connection refused by the server')
retry_count 3

可能是询问较为频繁,是否有时间间隔限制或者推荐?

大佬救命啊!!!

兄弟我昨天更改了我的那个sesstoken,昨天还能用,我今天刷新了一下那个sesstoken,结果就不能用了,一直提示我conservationid错误
大佬就救命啊,这是咋啦,我换了好几个Sesstoken都不管用,一直提示这个错误,昨天还可以用
屏幕截图 2023-02-07 134946

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.