forked from phoenix/litellm-mirror
Merge pull request #966 from PSU3D0/proxy_extras
(feat) Allow installing proxy dependencies explicitly with `pip install litellm[proxy]`
This commit is contained in:
commit
854ffbe79a
4 changed files with 20 additions and 2 deletions
|
@ -13,7 +13,7 @@ Docs outdated. New docs 👉 [here](./simple_proxy.md)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
```shell
|
```shell
|
||||||
pip install litellm
|
pip install litellm[proxy]
|
||||||
```
|
```
|
||||||
```shell
|
```shell
|
||||||
$ litellm --model ollama/codellama
|
$ litellm --model ollama/codellama
|
||||||
|
|
|
@ -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)
|
View all the supported args for the Proxy CLI [here](https://docs.litellm.ai/docs/simple_proxy#proxy-cli-arguments)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ pip install litellm
|
$ pip install litellm[proxy]
|
||||||
```
|
```
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|
|
@ -4,6 +4,7 @@ import shutil, random, traceback, requests
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
import secrets, subprocess
|
import secrets, subprocess
|
||||||
|
import warnings
|
||||||
messages: list = []
|
messages: list = []
|
||||||
sys.path.insert(
|
sys.path.insert(
|
||||||
0, os.path.abspath("../..")
|
0, os.path.abspath("../..")
|
||||||
|
@ -39,6 +40,10 @@ except ImportError:
|
||||||
import backoff
|
import backoff
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
warnings.warn(
|
||||||
|
"Installed runtime dependencies for proxy server. Specify these dependencies explicitly with `pip install litellm[proxy]`"
|
||||||
|
)
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
list_of_messages = [
|
list_of_messages = [
|
||||||
|
|
|
@ -19,6 +19,19 @@ certifi = "^2023.7.22"
|
||||||
appdirs = "^1.4.4"
|
appdirs = "^1.4.4"
|
||||||
aiohttp = "*"
|
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]
|
[tool.poetry.scripts]
|
||||||
litellm = 'litellm:run_server'
|
litellm = 'litellm:run_server'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue