A telegram bot powered by ChatGPT, that helps you to learn words of a new language.
The bot supports flashcards-style exercises.
The bot will send you exercises based on the schedule that you set up in user_data/user_config.json.
In addition, you can invoke a command to send you a new exercise whenever you want.
- Create a telegram bot. See, e.g. https://www.pragnakalp.com/create-telegram-bot-using-python-tutorial-with-examples/.
- Add the following commands to the bot (BotFather->Edit Bot->Edit Commands):
- next_test - Next test word
- next_new - Next new word
- add_word - Add a word
- Set up environment variables:
- Specify the bot token in environmental variable
BOT_TOKENor inapi_keys/bot_token.txt - Specify OpenAI API key in environmental variable
OPENAI_KEYor on the first line ofapi_keys/openai_api.txt - Path to folder containing user files
CH_USER_DATA_ROOT
- Specify the bot token in environmental variable
- Find chat_ids of all users who will use the bot.
- Specify user config in
user_data/user_config.jsonfor all users. For each user add an entry into<CH_USER_DATA_ROOT>/decks_db.csvas shown inresources/decks_db.csv. pip install -r requirements.txt