Home > Technology peripherals > AI > I added ChatGPT to the WeChat group, and I can now ask questions to the AI!

I added ChatGPT to the WeChat group, and I can now ask questions to the AI!

PHPz
Release: 2023-04-11 20:10:14
forward
1541 people have browsed it

1. Foreword: It’s a pleasure to use!

Since Brother Fu started using ChatGPT, he didn’t even use the search engine much. When searching for many questions, I immediately thought of going to ChatGPT to ask questions. Its answers are both very accurate and without a bunch of ads, making using ChatGPT a real gem for developers.

It can write simple project case codes for you, it can answer difficult questions that you have no shortage of ideas, and it can also help you optimize the PPT skills you need to wrap up! Hahaha, but of course there are things it can't do. For example, if I asked it to write MyBatis by hand, it told me:

I added ChatGPT to the WeChat group, and I can now ask questions to the AI!

ChatGPT: It is GPT (Generative Pre-training Transformer, generating pre-training transformer). Train Transformer) A variant of a language model specifically designed to generate human-like text in response to conversational-style prompts. ChatGPT is trained on a large dataset of human conversations and uses this training to generate appropriate and coherent responses to natural language cues. ChatGPT can be used to generate text for chatbots, virtual assistants, and other conversational systems, and is capable of generating a wide range of responses, including simple answers to questions, responses to prompts that require more complex reasoning or explanations, and ones intended to be humorous or engaging. response.

From ChatGPT, I seem to feel what is its value and what is my value. Those repetitive and meaningless tasks will eventually be constantly cannibalized and replaced.

But there are still many R&D personnel who have not experienced such a good thing, and it really shouldn’t be. After all, compared with many intelligent robots in the past, this thing seems to be mentally retarded. So Brother Fu found some information, deployed ChatGPT as a WeChat chatbot, and added it to the group for fellow fans to experience it.

2. Tutorial: How to deploy

1. Image file

There are many experts on Github who have provided ways to connect ChatGPT to WeChat chat. Mainly developed in TypeScript and Go languages. Basically these can also be deployed and used. Here, Brother Fu also saw that there is a mirror in Docker: cynen/wechat. It is also very convenient to deploy. Next, Brother Fu will use this method to deploy. Interested readers can also try to deploy other methods in Github. Github search: ChatGPT wechat

I added ChatGPT to the WeChat group, and I can now ask questions to the AI!

2. Register account

ChatGPT does not currently support domestic account registration, so you need to apply for a virtual number to register. If you can access and apply for the following steps, you can experience ChatGPT.

I added ChatGPT to the WeChat group, and I can now ask questions to the AI!

sms-activate.org - Register a virtual phone number [as shown in the picture] [Multiple services, India, openAI], just recharge the account with 2 yuan using Alipay.

beta.openai.com/signup - Register an account. During the registration process, you will be asked to fill in your virtual phone number and receive a verification code at the address in 1.

chat.openai.com/auth/login - Log in after registration is completed, and you can talk to AI.

3. API keys application

openai provides API keys for access. Only after applying for this API keys can subsequent access actions be completed.

I added ChatGPT to the WeChat group, and I can now ask questions to the AI!

Address: https://beta.openai.com/account/api-keys

Instructions: After clicking to enter, click Create new secret key You can apply now. After applying, your SECRET KEY will be copied. Just close the pop-up window after copying.

4. Image deployment

Here Brother Fu chooses to use Docker images to deploy a WeChat chat robot. You can install Docker locally or deploy it by purchasing cloud servers on JD Cloud, Alibaba Cloud, Baidu Cloud, Tencent Cloud, etc.

After entering Docker, you need to complete the following operations;

# 创建目录
mkdir /data/openai

# 创建文件
touch config.json

# 修改文件
vi config.json

{
"api_key": "复制粘贴你申请的API keys", # openai的 账户创建的apikeys
"auto_pass": false, # 加好友时,是否自动通过
"model": "text-davinci-003",# 模型名称,官网有很多模型
"session_timeout": 90# ession保存时间 秒,其实就是上下文保留时间. 超过这个时间,就会自动清空上下文
}

# 拉取镜像
docker run -dti --name wechat -v /data/openai/config.json:/app/config.json cynen/wechat

# 登录微信
docker logs -f wechat
Copy after login

I added ChatGPT to the WeChat group, and I can now ask questions to the AI!

When you start cynen/wechat and run docker logs -f wechat, you will see a pop-up Scan the WeChat QR code to log in. At this time, you can use one of your own WeChat codes to log in. After logging in, you can chat with this WeChat account or join a group.

5. Operation effect

WeChat group chat

I added ChatGPT to the WeChat group, and I can now ask questions to the AI!

##Background log

I added ChatGPT to the WeChat group, and I can now ask questions to the AI!

How about it, isn’t it quite interesting and very smart!

If you are unable to deploy such a robot yourself, you can also add Brother Fu’s WeChat account and join the group to experience it.

The above is the detailed content of I added ChatGPT to the WeChat group, and I can now ask questions to the AI!. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:51cto.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template