Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1005 Bytes

README.md

File metadata and controls

48 lines (32 loc) · 1005 Bytes

Chatgpt + Twilio + Whatsapp

This repository aims to implement a chat bot via Whatsapp, using the Twilio API and the ChatGPT API.

Running this project

  • Node.js
  • A Twilio account
  • A Twilio Whatsapp sandbox phone number
  • Ngrok so that you can respond to webhooks in your local development environment

Dependencies

npm install

Environment variables

Use the env.example file to create your .env, to set up your own variables.

Run the project

Start the web server:

npm start

Development mode

npm run dev

Expose the local server

To respond to an incoming webhook your will need a publicly available URL. One alternative is to expose your local server port. Ngrok is a tool that can tunnel through from a public URL to your machine. Once downloaded you can execute the following:

ngrok http 3000

The ngrok terminal will show you a URL, like https://RANDOM_STRING_.ngrok.io.