From 67dc9adc71a30183c758138a1318d94e942a3ff3 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Wed, 10 Jan 2024 17:47:34 +0530 Subject: [PATCH] (fix) import gunicorn --- litellm/proxy/proxy_cli.py | 5 ++--- litellm/proxy/proxy_server.py | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index 2b411738c..09b41034d 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -367,15 +367,14 @@ def run_server( ) try: import uvicorn + import gunicorn.app.base except: raise ImportError( - "Uvicorn needs to be imported. Run - `pip install uvicorn`" + "Uvicorn, gunicorn needs to be imported. Run - `pip 'litellm[proxy]'`" ) if port == 8000 and is_port_in_use(port): port = random.randint(1024, 49152) - import gunicorn.app.base - class StandaloneApplication(gunicorn.app.base.BaseApplication): def __init__(self, app, options=None): self.options = options or {} diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index e93c9baf1..a1390688e 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -14,7 +14,6 @@ sys.path.insert( ) # Adds the parent directory to the system path - for litellm local dev try: - import uvicorn import fastapi import backoff import yaml