Interact with LLMs via email
Project description
LLMail
Interact with Large Language Models (LLMs) via email.
Features
- Utilize any OpenAI-compatible API with any available model
- At the time of writing, OpenRouter offers free access to specific models with an OpenAI-compatible API
- 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 usesrestart: unless-stopped
to ensure the container restarts after a reboot or if it crashes
- The default
- Check every n seconds
- No need for a local database - uses IMAP
- Use phidata for real-time information retrieval
- Use Exa or DuckDuckGo for searching the internet
- Get information from a URL when requested and understand it when requested
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)
Docker
- Docker
Usage
Installing from PyPi with pip
(recommended)
This assumes you have the correct version of Python installed
pip install llmail
a. You may need to usepip3
instead ofpip
llmail
Installation from source or with Docker
Cloning the repository is not required when installing from PyPi but is required when installing from source
- Clone this repo with
git clone https://github.com/slashtechno/llmail
cd
into the cloned repository- Install and run with one of the following methods:
Poetry
poetry install
poetry run -- llmail
Docker
- Configure a
.env
file (see Configuration below)
a. You can also edit thedocker-compose.yml
file directly but by default it loads the.env
file docker compose up -d
Configuration
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
pip
, runpip 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llmail-0.3.0.tar.gz
.
File metadata
- Download URL: llmail-0.3.0.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4b43c3c71231cd53227d08f659caffc86e0d909f282e844d3f497e3b2b54acd |
|
MD5 | b8ce01f9236264cff686b5edc78b4c92 |
|
BLAKE2b-256 | 6b858b7ee596cd42acf45e298b1e53d0d322aee363e064a326568bf06953d9ef |
File details
Details for the file llmail-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llmail-0.3.0-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 919b1f4b6fc721559edd4820a52b8ad7dc153c98e6274e89d2c9bc54263540b8 |
|
MD5 | 64383414d1b82a5ad64ed3764918905a |
|
BLAKE2b-256 | f11305af282924815890787e83cb084c22e28b950f6eb0e0e7c4010a09737db7 |