This WhatsApp bot uses OpenAI's GPT and Twilio Messaging API to respond to user inputs. The tutorial walks you through the process of integrating OpenAI API and Twilio to build chatbot that can offer personalized and engaging experiences for users.
- Node.js (v18 or more)
- OpenAI & Twilio Accounts
- Clone this repository
- Install the required packages by running
npm install
- Add your OpenAI API key, Twilo's Account SID, Auth Token, GPT Model and Max Tokens into the
.env
file. Example file: .env.example - Run the bot using
npm start
- Start the ngrok using
~/ngrok http 3000
For a detailed tutorial on how to build chatbot with ChatGPT and Twilio, please refer to our Medium blog post here.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.