{"id":19175882,"url":"https://github.com/connectai-e/wework-openai-node","last_synced_at":"2025-04-15T06:55:48.909Z","repository":{"id":166216434,"uuid":"631435846","full_name":"ConnectAI-E/WeWork-OpenAI-Node","owner":"ConnectAI-E","description":"🎒 企业微信 ×OpenAI NodeJs版本","archived":false,"fork":false,"pushed_at":"2024-05-26T11:14:44.000Z","size":30,"stargazers_count":39,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T06:55:41.009Z","etag":null,"topics":["chatgpt","chatgpt-api","chatgpt-bot","connect-ai","javascript","nodejs","openai","openai-api","wechat"],"latest_commit_sha":null,"homepage":"https://www.connectai-e.com","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/ConnectAI-E.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-23T02:36:01.000Z","updated_at":"2025-02-24T21:18:26.000Z","dependencies_parsed_at":"2024-01-13T16:24:47.610Z","dependency_job_id":"cb09f272-0aa5-484c-9cb2-23fa1cbad820","html_url":"https://github.com/ConnectAI-E/WeWork-OpenAI-Node","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/ConnectAI-E%2FWeWork-OpenAI-Node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FWeWork-OpenAI-Node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FWeWork-OpenAI-Node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FWeWork-OpenAI-Node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ConnectAI-E","download_url":"https://codeload.github.com/ConnectAI-E/WeWork-OpenAI-Node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023713,"owners_count":21199958,"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":["chatgpt","chatgpt-api","chatgpt-bot","connect-ai","javascript","nodejs","openai","openai-api","wechat"],"created_at":"2024-11-09T10:26:03.203Z","updated_at":"2025-04-15T06:55:48.892Z","avatar_url":"https://github.com/ConnectAI-E.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align='center'\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/12178686/233246963-9f7e5eb0-d78f-4286-8536-2f4e9f9bee11.png\"  alt='' width='800'/\u003e\n\u003c/p\u003e\n\n\u003cdetails align='center'\u003e\n    \u003csummary\u003e 📷 点击展开完整功能截图\u003c/summary\u003e\n    \u003cbr\u003e\n    \u003cp align='center'\u003e\n    \u003cimg src='https://user-images.githubusercontent.com/12178686/233244040-7ab04261-79d7-4588-b8b1-18fc64d9f040.png' alt='语音对话' width='400'/\u003e\n    \u003c/p\u003e\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n\u003cp align='center'\u003e\n   企业微信 × OpenAI\n\u003cbr\u003e\n\u003cbr\u003e\n    🚀 WeWork OpenAI (node) 🚀\n\u003c/p\u003e\n\u003cp align='center'\u003e\n   www.connectai-e.com\n\u003c/p\u003e\n\n\n## 商业支持\n如果开源版无法满足您公司的需求，推荐您尝试目前正在内测的商业交付版本\n\n- 内置开箱即用的Azure Openai: 无需部署到海外，即可获得数十倍的性能提升\n- 掌控全局的Admin Panel: AI资源管理、对话日志查询、风险词规避和对话权限管理\n- 专人技术支持: 配备专业部署交付人员与后期一对一维护服务\n- 同时提供在线Saas版/企业级私有部署\n\n查看更多内容: https://www.connectai-e.com\n\n## 🌟 项目特点\n\n- 完成面向企业应用场景，\n- 一键部署，Serverless 无服务器模式，\n- 向导式安装，文档详细，安全可靠，网络延迟小,速度快\n\n\n\n\n\u003cimg width=\"200\" alt=\"image\" src=\"https://user-images.githubusercontent.com/50035229/233607863-b58f7097-2454-4feb-8cae-822ee41267f9.png\"\u003e\n\n## 关于本项目\n本项目可以实现一键部署ChatGPT到企业微信中，使ChatGPT与企业微信完美融合，手机或电脑上，打开企业微信，就可以使用强大的ChatGPT智能问答。本方案灵活性高，如果你不具备开发能力，可以使用下面方面1，直接一键安装即可；如果你是开发者，具有二次开发能力，可以按下面方法2任意扩展，\u003cbr\u003e\n\n1. 功能集成，将ChatGPT问答功能集成到企业微信中，借助企业微信权限功能，可以将ChatGPT共享到企业应用当中，此功能要求简单，有企业微信管理员权限即可，方法，参照下面的**部署方法**\n2. 更强大的功能扩展，本项目为开源项目，有开发能力的小伙伴可以Fork到自己的仓库，根据自己企业业务需要，比如结合企业微信开放的API，二次开发一些其他功能。\n\n\n\n\n## 部署方法\n\n\u003cdetails\u003e\n    \u003csummary\u003e云函数部署\u003c/summary\u003e\n\u003cbr\u003e\n1. 创建企业微信应用\u003cbr\u003e\n\n第一步，创建应用，操作方法：企微管理员， 电脑端上的企业微信--\u003e头像--\u003e管理企业--\u003e应用管理--\u003e（最下面）创建应用--\u003e应用logo + 填入基本信息\n\n![image](https://user-images.githubusercontent.com/12178686/233253399-489b0905-9a4c-4b2e-8f5d-ed7e8dac0f6b.png)\n\n\n第二步，配置应用，操作方法：接收消息一栏--\u003e设置API接收--\u003e未完等待第四步。\n![image](https://user-images.githubusercontent.com/12178686/233256124-cc6334e3-90ff-43e7-8fe5-3dc0026226fb.png)\n\n第三步，记录和准备下列字段信息， **corpid, agentid, secret, token ,aeskey, open-api-key**\n\n**corpid** :  电脑端上的企业微信--\u003e头像--\u003e管理企业--\u003e我的企业（下方） 图略\u003cbr/\u003e\u003cbr/\u003e\n**agentid, secret**: 第一步里完成后可见。\n![image](https://user-images.githubusercontent.com/12178686/233275423-67281448-02ee-4e61-8586-0fe095351fb2.png)\n\n**token ,aeskey**： 在设置API接收里（上面第二步）\n\n**open-api-key**\n这个需要在ChatGPT账号里生成，（如果没有chatgpt 账号也可以让别人生成一个，但是这个会产生费用） \n![image](https://user-images.githubusercontent.com/12178686/233278134-9d3fb914-9f3a-4049-b20e-3b0f237239f6.png)\n\n[申请网址API KEY](https://platform.openai.com/account/api-keys)\n\n\n第四步，一键部署到Render（代理服务器，免费，可以升级付费） \n\u003ca href=\"https://render.com/deploy?repo=https://github.com/sytpb/chatgpt-wework-robot\"\u003e\n  \u003cimg src=\"https://render.com/images/deploy-to-render-button.svg\" alt=\"Deploy to Render\"\u003e\n\u003c/a\u003e\n\n![image](https://user-images.githubusercontent.com/12178686/233276472-77ad1f07-e275-4bc2-a0fa-1c7d0b7172bc.png)\n\n如图所示，将上面的字段信息填入，然后点击Apply。 \n\n\n需要等3-5分钟部署，完成后复制生成的服务的URL，如下图，**然后拷贝URL后面拼接上/message**, 比如URL是 https://abc.com 拼接成 https://abc.com/message， 粘贴到上面**第二步**页面里，然后点保存，看到提示类似”保存成功“，代表服务已经配置成功了！\n![image](https://user-images.githubusercontent.com/12178686/233277321-5392207b-58c5-4c6e-959e-de71518e4094.png)\n\n最后一步： 企业可信IP配置， 应用页的最下方，配置可信IP。 \n![image](https://user-images.githubusercontent.com/12178686/233280128-10dbcbdd-db47-47d2-91a0-8b20f2fd8893.png)\n\nIP地址如下图，Render-\u003eConnect-\u003eOutbound \n![image](https://user-images.githubusercontent.com/12178686/233280575-8d92c978-cf06-4763-9443-694f495d3e16.png)\n\n将这三个ip地址配置到可信IP里，至此所有配置工作完成。\n\u003cbr/\u003e\n\n:100: 下面就可以直接体验了，手机或电脑上企业微信进入自己创建的应用，可以和ChatGPT的聊起来了。 \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e服务器docker部署\u003c/summary\u003e\n\n\n1. 相较于**云函数部署**方案，该方案需要:\n    - 一台服务器\n    - 一个域名\n\n1. 创建企业微信应用（参考`云函数部署 1.创建企业微信应用 第一、二、三步`）\n\n1. 复制变量文件 `.env.example`，填写自己的配置\n\n    - 若服务器网络与openai api不能直连，可配置自定义 openai api 地址，`OPENAI_PROXY_URL`.  \n      若无需自定义，请留空.\n        ```yaml\n        OPENAI_PROXY_URL=openai.abc.com\n        ```\n\n1. 运行docker\n\n    假设新变量文件名为 `.env.local`\n\n    ```bash\n    # docker4bill/ww-openai-node:alpine 为构建好的镜像，你也可以利用本仓库的 Dockerfile 构建自己的镜像\n    docker run --env-file .env.local -p 6060:6060 -d docker4bill/ww-openai-node:alpine\n    ```\n\n1. 用 `caddy` 或者 `nginx` 给以上服务做个反代\n\n    假设域名是**abc.com**, 以`caddy`为例配置:\n\n    ```yaml\n    abc.com {\n      reverse_proxy localhost:6060\n    }\n    ```\n\n1. 将服务器IP添加到**企业可信IP**\n\n1. 填写**接收消息服务器配置 URL**\n\n    假设反代地址为`abc.com`，在**其后添加/message**，将地址`https://abc.com/message`填入接收消息服务器配置的URL里\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnectai-e%2Fwework-openai-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnectai-e%2Fwework-openai-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnectai-e%2Fwework-openai-node/lists"}