Home > Article > Technology peripherals > It took another half an hour to connect ChatGPT to DingTalk robot.
The previous article introduced you how to use ChatGPT in personal WeChat, but everyone knows that this operation is risky, so everyone is asked to use the trumpet. Today I will introduce to you how to use ChatGPT in DingTalk. Use bots to tease AI.
The first two steps above are mainly to create an internally organized robot. Log in to the DingTalk developer backend https://open-dev.dingtalk.com/?spm=ding_open_doc.document.0.0.7f49263crfKgSY, and select Application Development > Enterprise Internal Development > Robots, click Create Application.
Before this, you need to make sure that your DingTalk account has joined an organization. If not, you can create an organization by yourself. After clicking Create Application, fill in the relevant information
and then configure the callback address of the robot in the development management menu, which is the address and port of the server where the code will be deployed later, as follows As shown in the figure.
In addition to directly using the IP of the server, you can also configure a specific domain name, but this requires a domain name, and you can also configure HTTPS. This is according to everyone If you want to use it yourself, using IP directly is the simplest way at that time.
But configuring a domain name is relatively simple, just apply for a domain name, and then configure an nginx reverse proxy. If HPPTS is needed, just configure a certificate.
Then publish the robot in the version management and release menu. At this time, a debugging group will be automatically created. You can then debug the robot directly in the debugging group. If there are no problems in debugging, you can use it in other internal groups. The robot has been added to .
OpenAi Due to some reasons, it is impossible to register an account normally in China, and even the website cannot be accessed normally. The detailed registration process is beyond the scope of this article. .
Here I will show you how to obtain an API key after successful registration. When we register successfully and log in, we can go to the link https://platform.openai.com/account/api-keys. Click Create new Secret key on the page to generate an API key. Copy the API key and store it for later use.
Deployment service is still as simple as before. We still deploy it through docker. Just one line of command. Done, here you can configure the custom port and the API Key obtained above, as well as the corresponding timeout and Session status instructions.
docker run -itd --name chatgpt -p 9999:9999 -e APIKEY=你的 API key -e SESSIONTIMEOUT=60s -e MODEL=text-davinci-003 -e MAX_TOKENS=512 -e TEMPREATURE=0.9 -e SESSION_CLEAR_TOKEN=清空会话 --rm docker.mirrors.sjtug.sjtu.edu.cn/eryajf/chatgpt-dingtalk:latest
After the command is executed successfully, we can see through docker ps that the service is back to normal.
After the service deployment is successful, we can locally test whether a port can be connected through the telnet ip port command. If Escape character is '^]' appears. characters means it is open. If the link cannot be connected, it may be that the server port is not allowed or the firewall is not turned on. You can check it in sequence.
After setting up the robot, we can have fun teasing it. Ah Fan did the following teasing, and the effect was still great.
Recently there are some articles on the Internet saying that this AI has passed Google’s interview and is said to be able to replace engineers. A fan is not too worried about this. , at least not in the short term. Although passing the interview does not mean that you can do a good job. The part of catching up with engineers is only based on some theories and eight-part essays.
Through teasing with AI, we can find that every time he answers a question, he will bring the context with him for training. This is why he can understand the context better than other robots.
So the answer to this model is often not the most critical. The most critical thing is how to ask a good question and continue to follow this question. Reflected in daily life, it is like two people having a conversation, rather than a simple question and answer, which has no connection.
If the context is filled with irrelevant content, it will add a lot of junk content to the AI, making subsequent answers even more meaningless and often looking incorrect.
With the emergence of such powerful AI, how can we programmers avoid being eliminated? Let's use magic to defeat magic. I have to say that the advice given by AI is still very pertinent.
Afen: What do you think of the emergence of ChatGPT? Will it have an impact on the programmer industry? At the same time, how should we as programmers avoid being eliminated by AI?
AI: The emergence of ChatGPT can help programmers develop programs more efficiently, but it will also bring challenges to programmers, because many repetitive coding tasks may be replaced by ChatGPT.
To avoid being eliminated by AI, programmers need to pay more attention to the depth of technology, constantly learn new technologies and methods, achieve value-driven software development, and cooperate with AI to achieve more efficient development.
In addition, programmers can also consider expanding their skills, such as learning a new programming language, understanding new software development tools, etc., in order to maximize and rationally use AI to improve their abilities and Competitiveness.
The above is the detailed content of It took another half an hour to connect ChatGPT to DingTalk robot.. For more information, please follow other related articles on the PHP Chinese website!