{"id":13642503,"url":"https://github.com/sytpb/chatgpt-dingtalk-robot","last_synced_at":"2025-04-09T11:31:04.501Z","repository":{"id":159830062,"uuid":"634468639","full_name":"sytpb/chatgpt-dingtalk-robot","owner":"sytpb","description":"零代码、一键部署chatgpt到钉钉，无须VPN","archived":false,"fork":false,"pushed_at":"2023-08-30T10:31:41.000Z","size":86,"stargazers_count":94,"open_issues_count":9,"forks_count":51,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T05:11:57.705Z","etag":null,"topics":["chat-bot","chatapp","chatbot","chatgpt","dingding","enterprise","openai","openai-chatgpt","robot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sytpb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-04-30T08:10:29.000Z","updated_at":"2024-11-29T09:47:11.000Z","dependencies_parsed_at":"2024-01-14T09:36:10.620Z","dependency_job_id":"b1daa57f-bb92-4e2b-841a-0476a051f64f","html_url":"https://github.com/sytpb/chatgpt-dingtalk-robot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sytpb%2Fchatgpt-dingtalk-robot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sytpb%2Fchatgpt-dingtalk-robot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sytpb%2Fchatgpt-dingtalk-robot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sytpb%2Fchatgpt-dingtalk-robot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sytpb","download_url":"https://codeload.github.com/sytpb/chatgpt-dingtalk-robot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248031148,"owners_count":21036337,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat-bot","chatapp","chatbot","chatgpt","dingding","enterprise","openai","openai-chatgpt","robot"],"created_at":"2024-08-02T01:01:32.258Z","updated_at":"2025-04-09T11:31:03.275Z","avatar_url":"https://github.com/sytpb.png","language":"JavaScript","funding_links":[],"categories":["Chatbots"],"sub_categories":[],"readme":"\n# 零代码 一键部署ChatGPT到钉钉 无须翻墙\u003cbr/\u003e\n\n\n\u003cdiv align=\"center\"\u003e\n    \u003ckbd\u003e\u003cimg src=\"https://user-images.githubusercontent.com/12178686/235676046-53200fda-5f48-4bb0-a2b5-00a887b8464f.jpg\" width=\"400px\"\u003e\u003c/kbd\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003ckbd\u003e\u003cimg src=\"https://user-images.githubusercontent.com/12178686/235674823-06be7c5e-f165-46e9-ab71-c805b95547f2.png\" width=\"800px\"\u003e\u003c/kbd\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"  style=\"font-size: 12px; line-height: 12px;\"\u003e\n   ChatGPT 接入钉钉, 赋能商业成功\n\u003c/div\u003e\n\n## 大模型AI客服邀请您体验\n我们基于chatgpt 大模型, 开发了Ai智能客服，Ai智能客服7*24小时服务能力，大大节省客服成本，提高公司服务效率。 \n接入场景包括 *微信*，*公众号*，*视频号小店*，*小程序*等\n需要体验的企业欢迎聊系我，名额有限。\n\n\n\u003cdiv align=\"center\"\u003e\n     \u003ckbd\u003e\n         \u003cimg src=\"https://github.com/sytpb/chatgpt-wework-robot/assets/12178686/9f2537aa-8dab-496f-b10d-08223f1f959b\" width=\"800px\"\u003e\n     \u003c/kbd\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e https://www.youtube.com/watch?v=Wd6zc7WmeUI \u003c/div\u003e\n\n\n\n## 关于本项目\n本项目可以实现一键部署ChatGPT到钉钉中，使ChatGPT与钉钉完美融合，手机或电脑上，打开钉钉，就可以使用强大的ChatGPT智能问答。截止目前，本项目可以提供两个能力:\u003cbr\u003e\n\n1. 功能集成，将ChatGPT问答功能集成到钉钉，借助钉钉机器人功能，我们可以与ChatGPT一对一问答，或者在群里让ChatGPT参与问答，安装请参照下面的**部署方法**\n2. 更强大的功能扩展，本项目为开源项目，有开发能力的小伙伴可以Fork到自己的仓库，根据自己企业业务需要，比如结合钉钉开放的API，二次开发一些其他功能。\n\n\n\n\n1. 创建钉钉应用\u003cbr\u003e\n\n## 部署方式一 Vercel方式（推荐）\n1. 创建钉钉应用\u003cbr\u003e\n\n\n第一步，创建应用。\u003cbr/\u003e\n1、登录[钉钉开发者后台](https://open-dev.dingtalk.com/#/)，选择应用开发 \u003e 企业内部开发 \u003e 创建应用，单击创建应用；创建应用后，进入机器人与消息推送页面，进入机器人配置页面。\n\n![image](https://user-images.githubusercontent.com/12178686/235679150-828883cb-213c-4d66-8059-6a2fc0015219.png)\n\n\u003cdiv align=\"center\"\u003e\n\u003ckbd\u003e\u003cimg src=\"https://user-images.githubusercontent.com/12178686/235679870-f67476e4-dd30-4019-9797-c48a1b29a1d1.png\" width=\"400px\"/\u003e\u003c/kbd\u003e\n\u003c/div\u003e\n\n2、单击应用功能 \u003e 机器人与消息推送。\n![image](https://user-images.githubusercontent.com/12178686/235680489-906ff1f9-57b6-4964-bba0-9f98667917c7.png)\n点亮此按扭\n\n3、打开机器人配置开关后，填写机器人相关配置信息，除了**消息接收地址**，信息完善后，请点\u003c发布\u003e，成功会看到“编辑成功”提示。\n\u003cdiv align=\"center\"\u003e\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/235687039-5ae8aa50-c530-4218-bad5-05f22c139fa1.png\" width=\"600px\"/\u003e \u003c/kbd\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n\n4、配置机器人权限，单击权限管理 \u003e 机器人，将相关权限开通，操作如下图，\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/235688384-84e36e99-26c5-4fe8-9447-6656ba4ca3df.png\" /\u003e \u003c/kbd\u003e\n\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/235688637-cb847183-e774-4de8-a103-fcc36576b2c0.png\" /\u003e \u003c/kbd\u003e\n\n\n第二步，部署前的准备工作\n\n1、**open-api-key**\n\n这个需要在ChatGPT账号里生成\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/233278134-9d3fb914-9f3a-4049-b20e-3b0f237239f6.png\" /\u003e \u003c/kbd\u003e\n\n[申请网址API KEY](https://platform.openai.com/account/api-keys)\n\n2、**AppKey AppSecret**\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/235689786-0b284295-3f94-47ad-a3a8-557c2ef8f91e.png\" /\u003e \u003c/kbd\u003e\n\n3、**要有一个自己的域名**\n自己已经注册好的一个域名。\n\n第三步，一键部署安装服务\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsytpb%2Fchatgpt-dingtalk-robot%2Ftree%2Fmain\u0026env=PORT,APPKEY,APPSECRET,OPENAI_MODEL,OPENAI_API_KEY\u0026project-name=chatgpt-dingtalk-robot\u0026repository-name=chatgpt-dingtalk-robot)\n请点右键 \u003e 新标签页打开 \u003cbr/\u003e\n\n\u003ckbd\u003e\n     \u003cimg src=\"https://github.com/sytpb/chatgpt-dingtalk-robot/assets/12178686/4b8390f2-027a-45de-b199-264774c088d0\" /\u003e \n\u003c/kbd\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n请将*Create private Git Repository* 勾点掉，然后点击 Create\n\u003cbr/\u003e\u003cbr/\u003e\n    \n\u003ckbd\u003e\n    \u003cimg src=\"https://github.com/sytpb/chatgpt-dingtalk-robot/assets/12178686/bdcb5f0c-14c7-4a0a-9409-5d5e157bd92e\" /\u003e\n\u003c/kbd\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n这一步要填入相关参数，注意，前后不要加入多余的空格， OPENAI_MODEL, 可以填入gpt-3.5-turbo或者gpt-4， ** 注意账号不支持gpt4,要填入 gpt-3.5-turbo，否则无法使用 **。 然后点击 Deploy。\n# 参数选项请参考下面参数表格说明\n\u003cbr/\u003e\u003cbr/\u003e    \n\n\u003ckbd\u003e\n    \u003cimg src=\"https://github.com/sytpb/chatgpt-dingtalk-robot/assets/12178686/52775310-2543-4b00-82f1-6aa52a142750\" /\u003e\n\u003c/kbd\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n部署成功，如图所示。\n\u003cbr/\u003e\u003cbr/\u003e\n    \n\u003ckbd\u003e\n    \u003cimg src=\"https://github.com/sytpb/chatgpt-dingtalk-robot/assets/12178686/d5f2ae85-342f-4a56-b1e0-314abbbde901\" /\u003e\n\u003c/kbd\u003e\n\u003cbr/\u003e \u003cbr/\u003e\n绑定自己的域名,填入域名，点 Add。\n\u003cbr/\u003e \u003cbr/\u003e\n    \n    \n\u003ckbd\u003e\n    \u003cimg src=\"https://github.com/sytpb/chatgpt-dingtalk-robot/assets/12178686/510f3fea-8fcb-4569-9dac-703fad7bdca4\" /\u003e\n\u003c/kbd\u003e\n\u003cbr/\u003e \u003cbr/\u003e\n保持默认，点 Add\n\u003cbr/\u003e \u003cbr/\u003e\n    \n\u003ckbd\u003e\n    \u003cimg src=\"https://github.com/sytpb/chatgpt-dingtalk-robot/assets/12178686/cc6a06b7-af1a-4821-8f75-383efa1437e4\" /\u003e\n\u003c/kbd\u003e\n\u003cbr/\u003e \u003cbr/\u003e\n复制 IP地址\n\u003cbr/\u003e \u003cbr/\u003e\n    \n\u003ckbd\u003e\n    \u003cimg src=\"https://github.com/sytpb/chatgpt-dingtalk-robot/assets/12178686/4e26c7e2-07e9-48a1-b16d-a67abcb6e3d7\" /\u003e\n\u003c/kbd\u003e\n\u003cbr/\u003e \u003cbr/\u003e    \n到自己购买域名的控制台，我这里是腾讯云控制台，给域名增加解析记录，如图所示，一条A记录，一条CNAME记录。\n\u003cbr/\u003e \u003cbr/\u003e\n    \n\u003ckbd\u003e\n    \u003cimg src=\"https://github.com/sytpb/chatgpt-dingtalk-robot/assets/12178686/7b2897ce-3f72-4c8f-bfe8-218b739e829e\" /\u003e\n\u003c/kbd\u003e\n\u003cbr/\u003e \u003cbr/\u003e\n配置成功，Vercel 页面会自动出现所示标志。\n\u003cbr/\u003e \u003cbr/\u003e\n    \n**把域名加上/message**, 比如域名是abc.com  URL： https://www.abc.com/message， 粘贴到上面**消息接收地址**页面里，点击\u003c调试\u003e，然后再次点击\u003c发布\u003e即可。到此部署完成！\n\n## 部署方式二 Render方式\n\u003cdetails\u003e\n    \u003csummary\u003e点击查看详细\u003c/summary\u003e\n\u003cbr\u003e\n[指导视频](https://youtu.be/JgBNsWQcSqw)\n\n1. 创建钉钉应用\u003cbr\u003e\n\n\n第一步，创建应用。\u003cbr/\u003e\n1、登录[钉钉开发者后台](https://open-dev.dingtalk.com/#/)，选择应用开发 \u003e 企业内部开发 \u003e 创建应用，单击创建应用；创建应用后，进入机器人与消息推送页面，进入机器人配置页面。\n\n![image](https://user-images.githubusercontent.com/12178686/235679150-828883cb-213c-4d66-8059-6a2fc0015219.png)\n\n\u003cdiv align=\"center\"\u003e\n\u003ckbd\u003e\u003cimg src=\"https://user-images.githubusercontent.com/12178686/235679870-f67476e4-dd30-4019-9797-c48a1b29a1d1.png\" width=\"400px\"/\u003e\u003c/kbd\u003e\n\u003c/div\u003e\n\n2、单击应用功能 \u003e 机器人与消息推送。\n![image](https://user-images.githubusercontent.com/12178686/235680489-906ff1f9-57b6-4964-bba0-9f98667917c7.png)\n点亮此按扭\n\n3、打开机器人配置开关后，填写机器人相关配置信息，除了**消息接收地址**，信息完善后，请点\u003c发布\u003e，成功会看到“编辑成功”提示。\n\u003cdiv align=\"center\"\u003e\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/235687039-5ae8aa50-c530-4218-bad5-05f22c139fa1.png\" width=\"600px\"/\u003e \u003c/kbd\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n\n4、配置机器人权限，单击权限管理 \u003e 机器人，将相关权限开通，操作如下图，\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/235688384-84e36e99-26c5-4fe8-9447-6656ba4ca3df.png\" /\u003e \u003c/kbd\u003e\n\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/235688637-cb847183-e774-4de8-a103-fcc36576b2c0.png\" /\u003e \u003c/kbd\u003e\n\n\n\n第二步，部署前的准备工作\n\n1、**open-api-key**\n\n这个需要在ChatGPT账号里生成\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/233278134-9d3fb914-9f3a-4049-b20e-3b0f237239f6.png\" /\u003e \u003c/kbd\u003e\n\n[申请网址API KEY](https://platform.openai.com/account/api-keys)\n\n2、**AppKey AppSecret**\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/235689786-0b284295-3f94-47ad-a3a8-557c2ef8f91e.png\" /\u003e \u003c/kbd\u003e\n\n\n\n\n第三步，一键部署安装服务\n\u003ca href=\"https://render.com/deploy?repo=https://github.com/sytpb/chatgpt-dingtalk-robot\"\u003e\n  \u003ckbd\u003e\u003cimg src=\"https://render.com/images/deploy-to-render-button.svg\" alt=\"Deploy to Render\"\u003e\u003c/kbd\u003e\n\u003c/a\u003e\n请点右键 \u003e 新标签页打开\n\n\u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/235695916-e0d48472-6769-4d92-bdbb-7721496f3575.png\" /\u003e \u003c/kbd\u003e\n\n\n如图所示，将上面的字段信息填入，端口填入4位数，比如7070，然后点击Apply。 注意现更新增加了OPENAI_MODEL  值可以是gpt-3.5-turbo 或者gpt-4（如果你的key支持可填） \u003cbr/\u003e\u003cbr/\u003e\n\n\n\u003ckbd align=\"center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/12178686/235698794-a8df81fc-9fe6-43b4-9705-e1fd6cd3b18e.png\" /\u003e\u003c/kbd\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003ckbd\u003e \u003cimg src=\"https://user-images.githubusercontent.com/12178686/235699569-b7c5a287-b96f-492d-9ab1-794d7368402a.png\" width=\"800px\" /\u003e \u003c/kbd\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n\n需要等1-5分钟部署，完成后复制生成的服务的URL，如下图，**然后拷贝URL后面拼接上/message**, 比如URL是 https://abc.com 拼接成 https://abc.com/message， 粘贴到上面**消息接收地址**页面里，点击\u003c调试\u003e，然后再次点击\u003c发布\u003e即可。\n\n\n\u003c/details\u003e\n\n## 部署方式三 Docker方式\n\u003cdetails\u003e\n\u003csummary\u003e服务器docker部署\u003c/summary\u003e\n\n1. 前提条件:\n  - 一台服务器\n  - 一个域名\n\n2. 复制变量文件 `.env.example`，填写自己的配置\n\n3. 运行docker\n假设新变量文件名为 `.env.local`\n\n```bash\n# docker4bill/ww-openai-node:alpine 为构建好的镜像，你也可以利用本仓库的 Dockerfile 构建自己的镜像\ndocker run --env-file .env.local -p 6060:6060 -d docker4bill/ww-openai-node:alpine\n```\n\n4. 用 `caddy` 或者 `nginx` 给以上服务做个反代即可\n\n\u003c/details\u003e    \n\n## 参数请参照下表完成,注意值前后不要有空格\n\n| Key                               |  value                         | 说明                                                                                                                                      |\n| --------------------------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| APPKEY                            |                                |                                                                                                                                           |\n| APPSECRET                         |                                |                                                                                                                                           |\n| OPENAI_API_KEY                    |                                |                                                                                                                                           |\n| OPENAI_MODEL                      |  gpt-3.5-turbo                 |     gpt-3.5-turbo 或者gpt-4    注意：不支持gpt4填入gpt-4无效                                                                               |\n| PORT                              |  7070                          |     可以改成其他                                                                                                                          |\n|CHAT_HISTORY                       |  no                            |     yes 或者 no  yes支持上下文会话，no 不支持上下文，区别上下文对话token 成本高                                                             |\n\n## 功能支持\n部署完成，:100: 下面就可以直接使用了，支持两种聊天模式，一是一对一单聊，另一个是群里添加此机器人，@他的名字，发消息让ChatGPT 回答，如文档开头的两个图片，第一张是一对一单聊，第二张是群里与ChatGPT聊天,更多使用场景请加群讨论。（有问题请提issue)\n\n\n## 新功能调查\n\n您的工作场景，最想要Chatgpt为您做什么？除了现有的问答模式。假如需要以下功能，\n\n1、语音对话，什么场景用？\n\n2、图片生成，什么场景用？\n\n3、其他，请列举\n\n欢迎来群里讨论！\n\n\n\u003cdiv align=\"center\"\u003e\n    \u003ckbd\u003e \u003cimg src=\"https://github.com/sytpb/chatgpt-dingtalk-robot/assets/12178686/1689367d-b06c-4a19-ae53-7e6223949306\" width=\"200px\" alt=\"group\"\u003e \u003c/kbd\u003e\n\u003c/div\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsytpb%2Fchatgpt-dingtalk-robot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsytpb%2Fchatgpt-dingtalk-robot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsytpb%2Fchatgpt-dingtalk-robot/lists"}