Skip to content

Commit

Permalink
docs: Improved installation section in README
Browse files Browse the repository at this point in the history
  • Loading branch information
slashtechno committed May 12, 2024
1 parent 9473962 commit 0ec215c
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@
Interact with Large Language Models (LLMs) via email.

### Features
- Utilize any OpenAI-compatible API
- Utilize any OpenAI-compatible API with any available model
- At the time of writing, [OpenRouter](https://openrouter.ai/docs#models) offers free access to specific models with an OpenAI-compatible API
- [Ollama](https://github.com/ollama/ollama) has an OpenAI-compatible API and allows for easy local deployment of LLMs
- Customize the behavior of the LLM with a system prompt
- Easily run in a Docker container
- The default `docker-compose.yml` file uses `restart: unless-stopped` to ensure the container restarts after a reboot or if it crashes
- Check every _n_ seconds
- No need for a local database - uses IMAP

## Prerequisites
### General
- Access to an OpenAI-compatible API (including locally hosted LLMs)
- An email account that supports IMAP and SMTP
### Python
- Python ^3.11
- Poetry (optional)
- An API key from an OpenAI-compatible API
### Docker
- Docker

Expand All @@ -35,12 +41,17 @@ Cloning the repository is not required when installing from PyPi but is required
2. `poetry run -- llmail`

#### Docker
1. Configure with the steps below
1. Configure a `.env` file (see Configuration below)
a. You can also edit the `docker-compose.yml` file directly but by default it loads the `.env` file
2. `docker compose up -d`

### Configuration
To configure the program, either use CLI flags (`--help` for more information) or environment variables.
To configure the program, either use CLI flags (`--help` for more information) or environment variables (view `.env.example` for more information).
It is recommended to just copy `.env.example` to `.env` and fill in the necessary information.

### Interacting with the LLM
Once the program is running, you can send an email to the address you configured with whatever the subject is set to. The body of the email will be sent to the LLM, and the response will be sent back to you.
For example, if in `.env` you set `SUBJECT_KEY=llmail`, you would send an email with the subject `llmail` to the configured email address.
### How to uninstall
- If you used Poetry, just delete the virtual environment and then the cloned repository
- If you used `pip`, run `pip uninstall llmail`
- If you used Poetry, just delete the virtual environment and then the cloned repository
- If you used Docker, run `docker compose down` in the cloned repository and then delete the cloned repository

0 comments on commit 0ec215c

Please sign in to comment.