Skip to content

prakharbhardwaj/chatgpt-whatsapp

Repository files navigation

ChatGPT + WhatsApp + Twilio = 🚀

Test Cases Prettier License: MIT

Example prompts

Introduction

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.

Requirements

  • Node.js (v18 or more)
  • OpenAI & Twilio Accounts

Installation

  1. Clone this repository
  2. Install the required packages by running npm install
  3. Add your OpenAI API key, Twilo's Account SID, Auth Token, GPT Model and Max Tokens into the .env file. Example file: .env.example
  4. Run the bot using npm start
  5. Start the ngrok using ~/ngrok http 3000

Tutorial

For a detailed tutorial on how to build chatbot with ChatGPT and Twilio, please refer to our Medium blog post here.

Contributing

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.