Merge pull request #966 from PSU3D0/proxy_extras

(feat) Allow installing proxy dependencies explicitly with `pip install litellm[proxy]`
This commit is contained in:
Ishaan Jaff 2023-11-30 15:46:25 -08:00 committed by GitHub
commit 854ffbe79a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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 = [

View file

@ -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'