Skip to main content

How to Build a WhatsApp Chatbot with ChatGPT In Termux

Build a WhatsApp OpenAI GPT-3 Bot with Node.js | A Step-by-Step Guide




Building a chatbot can be a fun and rewarding project, especially if you want to add automated functionality to your business or personal communications. In this guide, we will walk you through creating a chatbot for WhatsApp using the OpenAI language model behind ChatGPT. We are building a bot that automatically generates replies to WhatsApp messages.

This is the source code to build a WhatsApp bot using OpenAI bot and Node.js. The bot is able to understand natural language and provide information on various topics. It can be used to answer questions, provide advice, and even have conversations with users. With this source code, you can create a powerful robot that can be used for various purposes.

 WHAT is WhatsApp ChatBot??

A WhatsApp chatbot is an automated software that uses artificial intelligence or pre-programmed rules to engage your customers on the WhatsApp platform. Engati’s WhatsApp chatbots use AI and our proprietary Natural Language Processing (NLP) engine to interact with your customers intelligently.

Engati’s WhatsApp chatbots use AI and our proprietary Natural Language Processing (NLP) engine to interact with your customers intelligently. You can use them to answer customer questions about your products and services, share content, promote sales, and send notifications about orders, payments, shipping, etc.

WhatsApp business chatbots run on the WhatsApp Business API to intelligently communicate with your customers, employees, students, and other users without human intervention.

What Is OpenAI?

OpenAI came to life in 2015 in San Francisco as a joint initiative of Elon Musk, Sam Altman, Greg Brockman, Wojciech Zaremba, Ilya Sutskever, and John Schulman. The mission was simple but hugely ambitious – to develop secure and open AI tools to empower (rather than eradicate) humans.

What Is ChatBot?

ChatGPT is a powerful artificial intelligence bot developed by OpenAI. Its creators Altman, Musk, and other Silicon Valley investors created a non-profit organization engaged in artificial intelligence research in 2015 and presented it to the world on November 30, 2022. ChatGPT is a Chat Generative Pre-Trained Transformer. It is a powerful artificial intelligence robot capable of understanding human speech and producing in-depth writing that humans easily understand. ChatGPT’s use of a question-and-answer format makes it interesting.



REQUIREMENTS 
  • Termux App
  • Minimum Space Required = 200 MB 
  • Internet
  • Node js (npm)




How to download Termux

  • First Uninstall Old Termux and Install the New Upgrade Version
  • First, open the   F-DROID Website / App on your Android phone.
  • Search for the Termux app.
  • And install it on your Android phone by clicking the Download button
  • And it will download to your phone

STEPS OF CONNECTING CHAT BOT

After downloading termux app paste the following command on termux 

  • apt update -y && apt upgrade -y 
  • apt install git -y 
  • apt install nodejs -y
  • apt install nodejs-lts -y
  • apt install nano -y
  • git clone https://github.com/OnlineHacKing/Whatsapp-ChatGPT
  • cd Whatsapp-ChatGPT
  • npm install
  • nano api.json
To get an API key for the OpenAI API, you will need to register a free OpenAI account on the OpenAI website (https://openai.com/):



Then replace the text INSERT YOUR OPENAI API KEY in the api.json file with your personal API key.

Enit api.json file and add Openal API Key. and save this file. CURL +X and type Y and Enter

next command

  • node index.js
The output on the command line should then display the QR code correctly 








This QR code can then be used for verification via the WhatsApp mobile application. After scanning the QR code, you should see the following message:

How to scan QR in Whatsapp:

  • Open WhatsApp
  • Click 3 dot top right
  • Click the Linked Devices Button and again click the link a device button. or scanning the QR code
Now the Chatbot is running and showing a list of messages. Use the # sign and write the question as a WhatsApp message. The response is then generated by OpenAI and automatically accepted as a reply to the original message:



Waoo! It's done now the chatBot is running on your WhatsApp. And automatically reply via WhatsApp messages 







Prepared by WADUDUU GROUP
Written by DUDUU_MENDEZ 

Comments

Popular posts from this blog

NAMNA YA KUJIINGIZIA KIPATO KWA KUTUMIA SIMU (Tengeneza pesa kwa kutumia simu yako ya mkononi)

Karibu Tena katika blog yetu ya DUDUU_MENDEZ COMMUNITY.  Leo tutaenda kuangalia njia mbalimbali ambazo zitakusaidia kujiingizia kipato kupitia simu yako ya mkononi Kuna watu ambao hukaa ndani kwa masaa kadhaa na kujiingizia kiasi flani. Kwasasa dunia imekua sana katika suala la teknolojia na mitandao  Leo nitakuonyesha njia mbalimbali ambazo unaweza kuzitumia ukajiingizia kipato kwa kutumia simu yako ya mkononi NJIA ZA KUJIINGIZIA KIPATO KWA KUTUMIA SIMU YAKO  1.TIKTOK Kwasasa tiktok imeweza kuwalipa wengi, kuna watu ambao wanaendesha maisha yao kwa kutumia tiktok,  watu hao ndo wale unao waona wanaitwa content creators Content creators sasa hivi wamekuwa wengi katika kila kona ya dunia watu wengi wejiingizia kipato kupitia hio kazi yao Ili uweze kulipwa na tiktok itakubidi uwe umefungua international account na umewasha baadhi ya settings KAMA UNAHITAJI TIKTOK ACCOUNT YA INTERNATIONAL GUSA HAPA 👉 TIKTOK   👈 Nimefanya utafiti wangu nimeona watu wengi wapo tiktok na account kubwa laki...

How to Hide and Charge Ngrok, Cloudflare Link in Termux & Linux

The MaskingURL tool is used to hide any links or URLs behind the original link. This tool is a free and open-source tool that you can download from GitHub. This tool can perform social engineering attacks on victims. and hide all types of URL links like ngrok links. MaskingURL is a very useful tool and easy to use. This tool is written in bash. This tool is a bash script. The tool gives you the flexibility to use it as per requirement. This tool is a light tool means small. You can add your own URL after the original URL of the link. This tool was developed by JayKali, a group of ethical hackers. Maskphish is available as a console script. The user interface of this tool is very similar to Metasploitable 1 and Metasploitable 2, which makes it easy to use. People are smart enough these days. They will not fall into the phishlng trap. Because the link doesn’t look like the original website. For example, a phishlng link might be like https://ngrok.io/xxabcd , but it will open a page like ...

⚪DARASA LA KWANZA KATIKA ETHICAL HACKING 👨‍💻

🍀 HACKING NI NINI? Najua Neno hacking sio geni kwa watu wengi maana umeweza kusikia kuwa watu wengi wa wamekuwa wa hanga katika hacking . 🍀 MAANA :- Ni Kitendo Cha Kuingilia Mfumo wa Kompyuta . 🍀 HACKER NI NANI?👨‍💻 Ni mtu ambae mwenye ujuzi wa kutumia kompyuta na kuweza kuingilia mfumo wa kompyuta. 🍀 AINA ZA HACKERS 👨‍💻 Kuna Aina Nyingi za Hackers zaidi Ya Tano leo tutaongelea Baadhi. 1.WHITE HACKERS👨‍💻 Ni Aina Ya Hackers wenye uwezo wa kuingilia mfumo wa kompyuta na kudukua taarifa fulani katika mfumo huu ila wanakuwa na Ruhusa. 2. BLACK HACKERS👨‍💻 Ni Aina Ya Hackers wenye uwezo wa kuingilia mfumo wa kompyuta na kudukua taarifa fulani katika mfumo huu ila wanakuwa na Bila Ya Kupewa Ruhusa. 3.GREY HACKERS👨‍💻 Ni Aina Ya Hackers wenye uwezo wa kuingilia mfumo wa kompyuta na kudukua taarifa fulani katika mfumo huu ila wanakuwa na Ruhusa Au wasiwe na Ruhusa (vigeugeu) . 4.SCRIPT KIDDIES👨‍💻 Hawa Tunaweza Kusema Sio Hackers ama Hackers ambao hawana ujuzi kuhusu networking ...