Skip to content

juan-abia/marvin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Marvin

Personal assistant telegram bot. It's based on the fictional character Marvin from The Hitchhiker's Guide to the Galaxy.

marvin chat example

How to use

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>"]

Using docker

  1. Make sure you have docker installed and the daemon is active:
    sudo systemctl is-active docker
    
  2. Run the bot:
    docker run --rm --env-file .env -it juanabia99/marvin:latest
    

Run manually

To manually run the bot follow the next steps:

  1. Clone this repo and cd to it:
    git clone https://github.com/juan-abia/marvin.git
    cd marvin
    
  2. Activate a virtual environment and install requirements:
    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    
  3. 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>"
    
  4. Run main.py and enjoy using your personal assistant!
    python main.py
    

Contribution guide

Even though this is an experimental project, I'm open to contribution and feedback :)

About

Personal assistant telegram bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published