Skip to content

Commit

Permalink
uvicorn allow setting num workers (#7681)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff authored Jan 11, 2025
1 parent 5c870c0 commit 9ac18ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions litellm/proxy/proxy_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def is_port_in_use(port):
@click.option(
"--num_workers",
default=1,
help="Number of gunicorn workers to spin up",
help="Number of uvicorn / gunicorn workers to spin up. By default, 1 uvicorn is used.",
envvar="NUM_WORKERS",
)
@click.option("--api_base", default=None, help="API base URL.")
Expand Down Expand Up @@ -653,7 +653,7 @@ def _make_openai_completion():
from litellm.proxy.proxy_server import app # noqa

uvicorn_args = {
"app": app,
"app": "litellm.proxy.proxy_server:app",
"host": host,
"port": port,
}
Expand All @@ -674,6 +674,7 @@ def _make_openai_completion():
uvicorn.run(
**uvicorn_args,
loop="uvloop",
workers=num_workers,
)
elif run_gunicorn is True:
# Gunicorn Application Class
Expand Down

0 comments on commit 9ac18ca

Please sign in to comment.