Mila is a Discord bot designed to interactively assist with lifestyle management using OpenAI's technologies.
"Lifestyle Management" is a broad term that encompasses a variety of activities. What's your lifestyle? Customize Mila to fit your needs.
At the moment, Mila can:
Mila can be expanded with additional functionality by adding new tools to mila/tools/
and registering them in mila/tools/__init__.py
.
REMEMBER: Mila is an experiment. A fun pet project. It is not intended for production use. It connects to your OpenAI key, which is connected to your wallet. Use at your own risk.
This guide is intended for macOS/Linux users.
Clone the Mila repository into a directory of your choice.
git clone https://github.com/verba-ex-machina/Mila.git
cd Mila
Set up a Python virtual environment in the cloned directory.
python3 -m venv venv
Activate the virtual environment.
source venv/bin/activate
Verify Python path (should be within venv
directory).
which python3
Install required dependencies for Mila.
pip install -r requirements.txt
pip install -r requirements.txt -r requirements-dev.txt
Obtain and securely store API keys.
Create an .envrc
file in the root directory with the following content, replacing placeholders with actual API keys.
export DISCORD_TOKEN="your_discord_token"
export IMGFLIP_USERNAME="your_imgflip_username"
export IMGFLIP_PASSWORD="your_imgflip_password"
export OPENAI_API_KEY="your_openai_api_key"
export OPENWEATHERMAP_API_KEY="your_openweathermap_api_key"
export SERPAPI_API_KEY="your_serpapi_api_key"
layout python3
Important: Do not commit the .envrc
file to the repository or share it.
There are two ways to load the variables and virtual environment:
source .envrc
direnv
(installation guide).milabot.py
)With the setup complete and environment variables loaded, run the milabot.py
script to activate Mila on Discord.
./milabot.py