Personal assistant telegram bot. It's based on the fictional character Marvin from The Hitchhiker's Guide to the Galaxy.
There are two ways to use the bot. The first one and recommended is running the bot using docker, the second one is intended to try the bot by running from source.
for both ways there is a common step. Create a .env file in your working directory and add the following variables:
- Your telegram bot token
- Add your openai api key
- A list of telegram user ids for users that can interact with the bot. To get your telegram id, just talk with the bot @userinfobot
Once all the env variables are added, your .env file should look like this:
MARVIN_TOKEN=<YOUR_BOT_TOKEN>
OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
ADMINS=["<TELEGRAM_USER_ID_1>", "<TELEGRAM_USER_ID_2>"]
- Make sure you have docker installed and the daemon is active:
sudo systemctl is-active docker
- Run the bot:
docker run --rm --env-file .env -it juanabia99/marvin:latest
To manually run the bot follow the next steps:
- Clone this repo and
cd
to it:git clone https://github.com/juan-abia/marvin.git cd marvin
- Activate a virtual environment and install requirements:
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt
- Create a .env file and add your openai api key and your telegram bot token:
MARVIN_TOKEN="<your_bot_token>" OPENAI_API_KEY="<your_openai_api_key>"
- Run
main.py
and enjoy using your personal assistant!python main.py
Even though this is an experimental project, I'm open to contribution and feedback :)