This is the code repository which accompanies the article "How I built a personal Telegram AI Assistant in an Afternoon" on medium. Find the article here.
Clone the project
git clone https://github.com/deichrenner/PersonalPrivateAIAssistant.git
Create a virtual environment
python3 -m venv .venv
Activate the virtual environment
source .venv/bin/activate
Install dependencies
pip install -r requirements.txt
Install ollama
curl https://ollama.ai/install.sh | sh
ollama serve
Get the Telegram API token from the @BotFather and the API hash from the Telegram online center (see medium article for details) and add it to the .env file.
Start the Telegram bot
python bot.py
To run this project, you will need to add the required environment variables to the .env file. Copy the contents of the .env.example file and add the required API keys and tokens.