This is a telegram bot in role of a personal psychologist. It's working with Openai api.
- Download repo on you computer
- Install dependencies from requirements.txt
- Run file "dbscript.py" to create your local database
To use this bot you need your own API keys for telegram and openai
- Get telegram key from bot "BotFather" in telegram
- Paste it into the file main.py as a TOKEN variable value. Line 34
TOKEN = open("tg_TOKEN.txt", "r", encoding="utf-8").read()
- Get API key for openai from your own account
- Paste it into the file gtp_logic.py as a openai.api_key variable value. Line 12
openai.api_key = open("gtp_TOKEN.txt", 'r', encoding="utf-8").read()
- Run main script and your bot will become active
- Prompts on Russian language. Change every prompt on language you need
- Clone repo and create a new branch
- Make changes and test
- Submit pull request with comprehensive discription of changes
There is a lot of things can be done to improve this bot in my opnion. Here some of them:
- User data should be saved and sended to a "system" prompt
- User authentification
- Session shouldn't start from the beggining every time when connection is breaking
- Bot menu should be always available
- User should pass a little questionnaire to set bot more correctly through changing prompts
- User data should be hashed
- Secure methods
Big thanks to Ilya Lysov for idea
- linkedin - https://www.linkedin.com/in/eugene-poluyakhtov-924181256/
- telegram - @epguitars
- Thanks python-telegram-bot team for python telegram library!
- Thanks openai team for model and api!