This repository has been archived, due to recent change in Twitter API policy.
An AI bot that utilizes GPT-3.5 to analyze user's Twitter profile.
The main.py
file contains the main code for the AI bot. It processes tweets, gets responses from GPT-3.5, and tweets the responses back to the users. The code also sets up authentication and streaming rules for the Twitter API.
The app.py
file contains the code for the Flask web app. It connects to Redis to store and retrieve AI-generated responses for each user.
Ensure you have the following installed on your system:
- Python 3.6 or later
- Redis
-
Install redis on your system (For more information, see Redis Installation).
-
Clone the repository:
git clone https://github.com/SuhJae/Profile_AI.git cd Profile_AI
-
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Configure your
config.ini
andwebapp/config.ini
file with your API keys and redis database:- Obtain the necessary API keys for OpenAI and Twitter.
- Update the
config.ini
file with your keys, redis database and any additional settings. - For
webapp/config.ini
, just provide the redis database and certainly not needed if you don't want to run the web app.
-
Start the Redis server on your system.
-
Run
run.sh
to start the AI bot andwebapp/run.sh
web app. -
If you are going to use web app, make sure you install production server like
gunicorn
and run it withgunicorn -w 4 app:app