What The Chat is an open-source project that connects the OpenAI's ChatGPT API with WhatsApp, using Twilio. It allows users to interact with ChatGPT through their WhatsApp app, providing a seamless experience. Users can send text messages and audio messages to ChatGPT and receive responses directly in their WhatsApp chat.
Free and premium subscription options.
- Text and audio messaging support.
- Image generation support for premium users.
- Daily usage limit for free users.
- Python 3.6 or later.
- A Twilio account with a WhatsApp enabled phone number.
- An OpenAI API key.
- Clone the repository.
git clone https://github.com/your_username/what-the-chat.git
- Install the required dependencies.
pip install -r requirements.txt
- Set up environment variables in the .env file
- Run the Flask application.
python app.py
- Add the Twilio WhatsApp number to your contacts.
- Start a chat with the Twilio WhatsApp number.
- Send messages or audio messages to interact with ChatGPT.
- Premium users can generate images by sending a message starting with /image.
If you want to propose your ChatGPT based model as a service on Whatsapp you can connect it to Stripe.
- app.py: The main Flask application file
- openai_request.py: Handles OpenAI API requests for chat, audio transcription, and image generation
- .env: Your Twilio and OpenAI API credentials
- requirements.txt: The required Python packages for the project
- Database connexion (I used PostgresSQL)
- Stripe connexion
This project is open-source and available under the MIT License
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.
If you have any questions or suggestions, feel free to reach out at hello@what-the-chat.com.