Enterprise WeChat × OpenAI
WeWork OpenAI (node)
www.connectai-e.com
If the open source version cannot meet your company's needs, it is recommended that you try the commercial delivery version currently in internal testing.
View more: https://www.connectai-e.com
This project can implement one-click deployment of ChatGPT to Enterprise WeChat, so that ChatGPT and Enterprise WeChat are perfectly integrated. Open Enterprise WeChat on your mobile phone or computer, and you can use the powerful ChatGPT intelligent Q&A. This solution is highly flexible. If you do not have development capabilities, you can use the following method 1 and install it directly with one click. If you are a developer and have secondary development capabilities, you can expand it arbitrarily according to the following method 2.
The first step is to create an application. How to operate: Enterprise WeChat administrator, Enterprise WeChat on the computer-->Avatar-->Manage enterprise-->Application management-->(bottom) Create application-->Application logo + Fill in basic information
The second step is to configure the application. Operation method: Receive message column-->Set up API reception-->Wait for the fourth step before completion.
The third step is to record and prepare the following field information, corpid, agentid, secret, token, aeskey, open-api-key
corpid : Enterprise WeChat on the computer-->Avatar-->Manage Enterprise-->My Enterprise (below) Figure omitted
agentid, secret : Visible after completing the first step.
token, aeskey : In setting API reception (the second step above)
open-api-key needs to be generated in a ChatGPT account (if you don’t have a chatgpt account, you can also ask others to generate one, but this will incur fees)
Application URL API KEY
The fourth step is to deploy to Render with one click (proxy server, free, you can upgrade for a fee)
As shown in the picture, fill in the above field information and click Apply.
You need to wait 3-5 minutes for deployment. After completion, copy the URL of the generated service, as shown below, then copy the URL and append /message . For example, the URL is https://abc.com and splice it into https://abc.com/message. , paste it into the second step page above, and then click Save. When you see a prompt similar to "Save Successfully", it means that the service has been configured successfully!
The last step: Enterprise trusted IP configuration. At the bottom of the application page, configure the trusted IP.
The IP address is as shown below, Render->Connect->Outbound
Configure these three IP addresses into trusted IPs, and now all configuration work is completed.
? Now you can experience it directly. Use Enterprise WeChat on your mobile phone or computer to enter the application you created, and you can chat with ChatGPT.
Compared with the cloud function deployment solution, this solution requires:
Create an enterprise WeChat application (refer to云函数部署1.创建企业微信应用第一、二、三步
)
Copy the variable file .env.example
and fill in your own configuration
OPENAI_PROXY_URL
. OPENAI_PROXY_URL=openai.abc.com
Run docker
Assume the new variable file is named .env.local
# docker4bill/ww-openai-node:alpine 为构建好的镜像,你也可以利用本仓库的 Dockerfile 构建自己的镜像
docker run --env-file .env.local -p 6060:6060 -d docker4bill/ww-openai-node:alpine
Use caddy
or nginx
to reverse the above services
Assume that the domain name is abc.com , take caddy
as an example to configure:
abc.com {
reverse_proxy localhost:6060
}
Add server IP to enterprise trusted IP
Fill in the receiving message server configuration URL
Assume that the reverse address is abc.com
, add /message after it , and fill in the address https://abc.com/message
into the URL configured by the message receiving server.