When I pulled the ChatGPT robot into the WeChat group, the group members went crazy! !

Hello everyone, I am Piao Miao!

Recently, ChatGPT can be described as popular, and the stocks in the field of artificial intelligence have been driven by this guy all the way recently. If you haven’t heard or used it until now, you may be a little out.

Today's article does not intend to introduce ChatGPT, but to show you a fun thing to do. Pull the ChatGpt chatbot into your WeChat group, so that as the group friends say, you can pretend to be the omnipotent person behind ChatGpt.

The effect in the WeChat group is as follows:

image-20230208221022410

Hands-on teaching, the latest test version, if it is effective, please repeat it.

prerequisite

  1. A global proxy that can access the Internet scientifically (recommended to use the US node)
  2. An email address is used to register ChatGPT (Gmail, OutLook are both available)
  3. A foreign mobile phone number is used to receive the verification code
  4. A server with a Docker environment installed
  5. A WeChat account is used to pretend to be a robot

Sign up for ChatGpt

1. Turn on the global proxy on your device

It is recommended to use the US node. If the global proxy is not enabled, or the node used is unstable, there may be an error message that ChatGPT is unavailable in the current region.

2. Log in https://platform.openai.com/signupRegister account

Fill in the prepared email address and click Continue

3. After completing the information, go to the phone verification page

image-20230208222208084

Stop on this page first, and then we need to prepare a mobile phone number to receive the verification code.

4. Buy an overseas mobile phone number at sms-activate.org to accept the verification code

4.1) Visit sms-activate.org, register and log in to your account

4.2) After logging in, switch to Chinese in the upper right corner

image-20230208162659061

4.3) Click the user icon in the upper right corner and select the recharge button

image-20230208222816662

Here, the recharge is done through Alipay. Now this platform has increased the price. The minimum payment amount is 0.5 US dollars, and it is 3.55 yuan to convert into adult currency.

4.4) Purchase OpenAI services

image-20230208162804417

After selecting OpenAI, enter the country service list page. Here, we recommend you to buy services in Indonesia. I personally tested India today and cannot accept verification codes.

image-20230208162710493

4.5) Copy and paste the purchased mobile phone number to the mobile phone number verification interface in step 3, and click Send code via SMS

4.6) Pay attention to the sms-activate.org page, you will receive a verification code soon, fill the verification code into the verification code input box on the ChatGPT page to complete the verification

image-20230208223611034

4.7) After the registration is complete, log in to chat.openai.com , and you can talk to OpenAI

Configure WeChat robot

OpenAI provides API keys for access, and only after applying for this API key can the subsequent access actions be completed, so we first need to apply for an API KEY.

apply for openopi

1. Access https://platform.openai.com/account/api-keys, after entering, click Create new secret key to apply.

image-20230208170456377

2. Deploy the WeChat chatbot through the prepared server (Docker), which can be deployed locally or on a cloud server.

The deployment steps are as follows:

# 1. 创建目录
mkdir -p /data/openai
​
cd /data/openai
​
# 2. 创建文件
touch config.json
​
# 3. 修改文件
vi config.json
​
{
  "api_key": "复制粘贴你申请的API keys", # openai的 账户创建的apikeys
  "auto_pass": false,         # 加好友时,是否自动通过
  "model": "text-davinci-003", # 模型名称,官网有很多模型
  "session_timeout": 90        # session保存时间 秒,其实就是上下文保留时间. 超过这个时间,就会自动清空上下文
}
​
# 4. 拉取镜像
docker run -dti --name wechat -v /data/openai/config.json:/app/config.json cynen/wechat
​
# 5. 查看日志
docker logs -f wechat
复制代码

image-20230208173432041

When viewing the log, we can see that a QR code appears on the log interface. At this time, use your WeChat account to scan and log in. After logging in, you can ask him questions, or pull the account into your WeChat group.

In the WeChat group, as long as you at him, you can ask him questions.

How about it, isn't it fun? You should also quickly deploy one to try!

Guess you like

Origin juejin.im/post/7197995910566330425