forked from phoenix/litellm-mirror
Use poetry extras for proxy
This commit is contained in:
parent
bc2299184b
commit
5e6913dff2
2 changed files with 18 additions and 20 deletions
|
@ -17,27 +17,10 @@ try:
|
||||||
import yaml
|
import yaml
|
||||||
import rq
|
import rq
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import sys
|
raise ImportError(
|
||||||
|
"Running `litellm proxy` requires installing via `pip install litellm[proxy]`"
|
||||||
subprocess.check_call(
|
|
||||||
[
|
|
||||||
sys.executable,
|
|
||||||
"-m",
|
|
||||||
"pip",
|
|
||||||
"install",
|
|
||||||
"uvicorn",
|
|
||||||
"fastapi",
|
|
||||||
"appdirs",
|
|
||||||
"backoff",
|
|
||||||
"pyyaml",
|
|
||||||
"rq"
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
import uvicorn
|
|
||||||
import fastapi
|
|
||||||
import appdirs
|
|
||||||
import backoff
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,21 @@ 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}
|
||||||
|
yaml = {version = "*", optional = true}
|
||||||
|
rq = {version = "*", optional = true}
|
||||||
|
|
||||||
|
[tool.poetry.extras]
|
||||||
|
proxy = [
|
||||||
|
"uvicorn",
|
||||||
|
"fastapi",
|
||||||
|
"backoff",
|
||||||
|
"yaml",
|
||||||
|
"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