Personal WeChat access ChatGPT to become a chat robot
Summary
This year ChatGPT is in a mess, and a large number of experts say that programmers will be replaced by AI, and AI will rule humans. Although I think it's a bit exaggerated, it doesn't have a big impact on me for the time being, but since there are new things coming out, I still have to play with them, so as not to be eliminated slowly when I get really old. So I registered an openai account. There are many specific registration steps on the Internet. I will post a few links below for your reference. Then it happened that I kept a VPS in the United States, which I basically didn’t use very much, and occasionally used it to climb over the wall. The VPS service provider is Linode, which is not expensive. It costs $10 a month. There is a link below. If you need it, you can register and play. And I have a WeChat account, which is simply used to connect to ChatGPT as a chat robot, so that I can ask questions without going over the wall. Let's talk about the specific process and related information.
https://www.linode.com/lp/refer/?r=a17465df3cd13599a6c4c1397c3f4247a88e0527
Register openai account
To register an openai account, you must first circumvent the firewall. Most of the current firewall tools are not easy to use, and it may be that the firewall in Guangdong is particularly powerful. I won’t talk about free ones. I probably use ExpressVPN, Private Internet Access, and Pure VPN. , Surfshark have tried, only Surfshark can occasionally connect to small European countries. NordVPN is not, but it seems that I have tried it before and it doesn't work well.
I am currently using a service provider in Hong Kong called Webers Cloud. I don't have my own client, but I use CISCO's client. The regions that can be selected are only Hong Kong and the United States, but only the United States can access chat.openai.com
. Although the speed of the Internet is not very good, it can be connected, and it is relatively stable. It costs 30 yuan each. If you want to use it, you can use the link below to help me save some free time.
https://www.vps000.org/?ac=BB3F88&promote_id=155991
After successfully overcoming the wall, start to register an openai account. There are many online tutorials. I also operate step by step through other people's tutorials. You can refer to the link below for the tutorial address, which has been explained in great detail. I remember that the virtual mobile phone number I bought was a UK number, and I could receive the verification code normally.
https://juejin.cn/post/7203009064719400997
Bind credit card
The newly registered openai account has an API quota of 18 US dollars that can be used for free. Of course, there is a time limit. If it is not used up within three months, it will automatically expire. I strongly recommend binding a credit card immediately after registering an account. Because you are using ChatGPT over the wall, it will detect that your login IP changes frequently, and will turn the account into a black account, which will basically make it difficult to bind the card successfully in the future. I just waited until the free credit was used up before binding the card, which resulted in the failure of binding the card, canceling an account, and then re-registered a new account to bind the card successfully.
Before registering a new account, I purchased a virtual credit card through the following method. The service provider I used was nobepay. The advantage is that it supports direct recharging with Alipay, and the opened card does not require monthly rent, but at least 500 RMB each time. The service fee for card top-up is 3%, which is a little high. It seems that many people use depay, and the service fee seems to be only 1.5%, but it does not support direct recharge, it must be recharged with USDT digital currency, and the monthly rent of the card is 1 US dollar.
https://zhuanlan.zhihu.com/p/631997477
But I am a little different, I am reluctant to recharge 500 yuan at a time, so I registered the Ouyi digital currency trading platform, and then bought 20 USDT coins, because I just want to bind the card for the time being, and I have no plan to open ChatGPT Plus, USDT and US dollars Basically, it is 1:1. After deducting the transaction service fee and card opening service fee from US$20, there is almost US$15 left, and there are two or three trial and error opportunities for the card to be rejected. ChatGPT Plus will deduct US$5 by default if the card is successfully linked, so 20 USDT coins are really just enough. If you want to buy ChatGPT Plus, you need to deposit at least 30 USDT coins. The registration address of the Ouyi digital currency trading platform is as follows. Of course, the link contains my referral code, and I don’t know what rewards there are.
Although I figured it out by myself, I found an operation tutorial for everyone, which explained in detail how to register Ouyi, how to recharge, and how to withdraw coins to depay. Of course, nobepay is similar.
https://5best1s.com/okx购买usdt泰达币/
If the above steps are successful and the credit card is successfully bound, then congratulations, you are the lucky one, you can skip the following content and go directly to the next chapter.
I was not so lucky. When I linked the card to ChatGPT, it kept prompting that the card was rejected. I changed a few cards, but it still didn’t work. I was about to collapse and vomit blood. After a lot of searching, I came to the conclusion that my account is already a black account, and the probability of successfully binding the card is almost 0. Then I read the following article, and I planned to spend 200 yuan to ask him to help register a new account and bind a card, but anyway, I still have two Gmail mailboxes, so I will use one of them first and then try it myself. Once, if it doesn't work, use another email to find someone to help you register and bind the card.
https://www.vpsdawanjia.com/6149.html
In the end, Huang Tian paid off, and really let me bind the card successfully. The nervousness when I clicked the submit button at the end, and the joy after the prompt was successful are really indescribable.
In fact, the above link is very clear, as long as you are in the same IP environment from registration to card binding, the success rate is very high. But I didn't completely follow the steps in the above article, because I already have a virtual phone number and a virtual credit card, and the only step left is to bind the card. So I adopted one of the solutions in the article, which is Use a new Windows remote desktop server to re-register a ChatGPT account, and use the new card and new account address to activate. There is a link in the article on the registration steps of the specific remote desktop, I will post it again for everyone.
https://www.vpsdawanjia.com/6049.html
I also use LightNode as a service provider, so I will continue to post the link with the invitation code shamelessly, maybe some kind person will really bring me a 10% commission.
https://www.lightnode.com/?inviteCode=0OCCN9&promoteWay=LINK
At this point, everyone must be able to successfully bind the card. By the way, the virtual credit card that I successfully bound is 558068.
Personal WeChat access ChatGPT API
At the beginning, I thought about writing the code myself, but I only know Java, and using Java just to realize the content forwarding of the API is a bit of a waste of server memory. My VPS only has 2G memory, which is not much left.
Then open source is a good thing. I searched for related projects on GitHub using the keywords of wechat+chatgpt. It was implemented with TypeScript and Python, and it supports text, voice and pictures. That function is really niubility. But I just want to do a simple text chat for the time being, so I finally chose a project written in GoLang.
https://github.com/djun/wechatbot
But the author didn't update it after he finished writing it. It doesn't support the latest GPT3.5, so I found one of his fork projects.
https://github.com/qingconglaixueit/wechatbot
This project has added GPT3.5 support, but I don’t know why the author stopped updating the code before it was completely written. So I, a programmer who only knows Java, simply learned the grammar of GoLang, forked another version, finished writing the remaining functions, and used GPT3.5. My warehouse address is as follows.
https://github.com/chcbz/wechatbot
The specific usage is written in README, and I will post it here separately.
# Get items
$ git clone https://github.com/chcbz/wechatbot.git
# enter the project directory
$ cd wechatbot
# copy configuration file
$ copy config.dev.json config.json
# Modify the configuration file and fill in your own api_key
vi config.json
# Startup project
$ go run wechatbotd.go
# After successful operation, the QR code will be displayed, and you can log in with your personal WeChat to scan the QR code
# As long as other WeChats send messages to the current WeChat, you can get a ChatGPT reply
# It can also be run in the background by the following command
nohup go run wechatbotd.go > wechatbot.log 2>&1 &
# Then view the QR code through the log file
cat wechatbot.log
As for how to buy a VPS and how to install the GoLang environment, there are a lot of searches on the Internet, so I won’t write it separately.
Just like that, my personal WeChat chatbot can happily chat.