A reliable AI assistant in the form of a Telegram bot that will keep track of each students’ projects and homework submissions.
For those who want to set up their own personal Telegram bot.
Follow the instructions here to install Git on your computer. Also follow this guide to install Python >= 3.9 if you haven't already.
Open a command line window and run these commands to clone this entire repository and install the additional dependencies required.
git clone https://github.com/SociallyIneptWeeb/NUSBuddy
cd NUSBuddy
pip install -r requirements.txt
Using the Telegram app, message the BotFather by issuing the /newbot
command and following the steps until you're given a new token. You can find a step-by-step guide here.
Your token will look something like this:
4839574812:AAFD39kkdpWt3ywyRZergyOLMaJhac60qc
- Rename the .env.sample file to
.env
. If you have another Postgres database running on your machine, you can update thePOSTGRES_PORT
in the.env
file to point to another unused port. - Update the
TELEGRAM_TOKEN
with the token from the previous step. - Update the
OPENAI_KEY
with an API key from OpenAI on this page.
Ensure that the init.sql file permissions allow users to read the file. Also ensure you have Docker Compose installed, then run the following command to create and run the Postgres database in a docker container.
docker-compose up -d
Run the following command in the src directory to start your telegram bot.
python telebot.py