This project enables you to interact with OpenAI's ChatGPT model via WhatsApp. By connecting WhatsApp with the ChatGPT API, you can send messages to a WhatsApp number, which are then processed by ChatGPT to generate responses.
- Send messages to a WhatsApp number to initiate conversations with ChatGPT.
- Receive responses from ChatGPT directly on WhatsApp.
- Easy setup and integration with Twilio for WhatsApp API.
To get started with this project, follow these steps:
- Clone the repository.
- Set up a Twilio account and obtain your Twilio API credentials.
- Set up an OpenAI account and obtain your OpenAI API key.
- Configure your environment variables with your API credentials.
- Install the required dependencies using
pip install -r requirements.txt
. - Run the Flask application using
python3 app.py
. - Set up ngrok to expose your local server to the internet.
- Configure your Twilio account to use the ngrok URL as the webhook for incoming messages.
Once the setup is complete, you can start sending messages to the WhatsApp number connected to the Twilio account. ChatGPT will process your messages and generate responses, which will be sent back to you via WhatsApp.
Contributions are welcome! If you'd like to contribute to this project, please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License.