This project implements a WhatsApp bot using the Selenium WebDriver. The bot is designed to automate various interactions on the WhatsApp platform, such as authenticating, opening contacts, reading messages, sending messages and ChatGPT integration.
At this moment you can use the bot to:
- Open contacts based on name
- Read chat messages
- Send chat messages
- ChatGPT integration
Before running the project, make sure you have the following requirements installed:
- Python (version 3.8.7)
- Selenium - For run webdriver
- OpenAI - For ChatGPT Integration
- Clone the repository:
git clone /~https://github.com/GabrielHinz/whatsbot.git
- Navigate to the project directory:
cd whatsbot
- Installing dependencies:
pip install -r requirements.txt
Note: Make sure firefox is installed, it will be used in this project
Change the configuration in the config.yml file.
- Run the
example.py
file:
python example.py
- Wait and write the contact name in terminal
Which contact do you want to open? _My_Contact_Name_
Note: The first time you run this program it will authenticate in whatsapp, if it takes too long it may timeout. Adjust the time in the config file if needed.
- Open the
chatgpt.py
file and write your API token
# Insert your OpenAI api key
openai.api_key = ""
- Run the
chatgpt.py
file:
python chatgpt.py
If you would like to contribute to this project, please follow the steps below:
- Fork this repository.
- Create a feature branch (git checkout -b feature/feature-name).
- Make the desired changes.
- Commit the changes (git commit -am 'Add a new feature').
- Push to the branch (git push origin feature/feature-name).
- Open a Pull Request.
- Gabriel Hinz - DevOps Eng. - About
This project is licensed under the MIT License (LICENSE.md)