diff --git a/docs/my-website/docs/proxy_server.md b/docs/my-website/docs/proxy_server.md index 438e68cf7..ec8ca15c5 100644 --- a/docs/my-website/docs/proxy_server.md +++ b/docs/my-website/docs/proxy_server.md @@ -13,7 +13,7 @@ Docs outdated. New docs 👉 [here](./simple_proxy.md) ## Usage ```shell -pip install litellm +pip install litellm[proxy] ``` ```shell $ litellm --model ollama/codellama diff --git a/docs/my-website/docs/simple_proxy.md b/docs/my-website/docs/simple_proxy.md index fd709eab8..6df34bad2 100644 --- a/docs/my-website/docs/simple_proxy.md +++ b/docs/my-website/docs/simple_proxy.md @@ -16,7 +16,7 @@ LiteLLM Server manages: View all the supported args for the Proxy CLI [here](https://docs.litellm.ai/docs/simple_proxy#proxy-cli-arguments) ```shell -$ pip install litellm +$ pip install litellm[proxy] ``` ```shell diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 20d39d817..4cd573c9b 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -4,6 +4,7 @@ import shutil, random, traceback, requests from datetime import datetime, timedelta from typing import Optional, List import secrets, subprocess +import warnings messages: list = [] sys.path.insert( 0, os.path.abspath("../..") @@ -39,6 +40,10 @@ except ImportError: import backoff import yaml + warnings.warn( + "Installed runtime dependencies for proxy server. Specify these dependencies explicitly with `pip install litellm[proxy]`" + ) + import random list_of_messages = [ diff --git a/pyproject.toml b/pyproject.toml index 239d3c5b3..c405e1c49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,19 @@ certifi = "^2023.7.22" appdirs = "^1.4.4" aiohttp = "*" +uvicorn = {version = "^0.24.0.post1", optional = true} +fastapi = {version = "^0.104.1", optional = true} +backoff = {version = "*", optional = true} +rq = {version = "*", optional = true} + +[tool.poetry.extras] +proxy = [ + "uvicorn", + "fastapi", + "backoff", + "rq" +] + [tool.poetry.scripts] litellm = 'litellm:run_server'