documentation
documentation copied to clipboard
Tutorial: Use litellm with shift
- Docker compose
services:
litellm:
build:
context: .
args:
target: runtime
image: ghcr.io/berriai/litellm:main-stable
ports:
- '4000:4000'
environment:
LITELLM_MASTER_KEY: sk-admin-key-1234567890
DATABASE_URL: 'postgresql://llmproxy:dbpassword9090@db:5432/litellm'
STORE_MODEL_IN_DB: 'True'
STORE_PROMPTS_IN_SPEND_LOGS: 'True'
depends_on:
- db
db:
image: postgres:16
restart: always
container_name: litellm_db
environment:
POSTGRES_DB: litellm
POSTGRES_USER: llmproxy
POSTGRES_PASSWORD: dbpassword9090
ports:
- '5439:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
name: litellm_postgres_data
- Setup a model provider in litellm
- Create a virtual key
- In caido, use the virtual key + litellm url as "openai"
- In shift v2 (currently not released), in "models", create a new model for openai (make sure the alias is openai/
) - Then you will be able to use that model in agents (it will show as an openai model but it works)