Getting Started
Installation
How to install llms.py
Using pip
The easiest way to install llms.py is using pip:
pip install llms-pyUsing Docker
Pre-built Docker Images
Pull and run the latest image:
docker pull ghcr.io/servicestack/llms:latestdocker run -p 8000:8000 -e GROQ_API_KEY=$GROQ_API_KEY ghcr.io/servicestack/llms:latestUsing docker compose (Recommended)
- Download the docker-compose.yml file:
- Create a
.envfile with your API keys:
OPENROUTER_API_KEY=sk-or-...
GROQ_API_KEY=gsk_...
GOOGLE_FREE_API_KEY=AIza...- Start the service:
docker compose up -dBuild from Source
If you've cloned the repository:
git clone https://github.com/ServiceStack/llmscd llmsdocker compose -f docker-compose.local.yml up -d --buildSetup
Setup environment variables for the providers you want to use.
Updating
To update to the latest version:
pip install llms-py --upgradeAfter upgrading, it's recommended to also upgrade any external extensions:
llms --update allFor Docker:
docker pull ghcr.io/servicestack/llms:latestReset to latest configuration
New versions sometimes include changes to llms.json config which isn't automatically updated.
Use the --reset option to reset the default configuration files back to its factory defaults. Available reset options (config, providers, all):
config - Reset ~/.llms/llms.json to default
llms --reset configproviders - Reset ~/.llms/providers.json and ~/.llms/providers-extra.json
llms --reset providers