mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix(proxy_server.py): allow user to disable swagger ui docs via env
user can disable swagger ui docs by setting 'NO_DOCS="True"' in their env
This commit is contained in:
parent
44a91fe43a
commit
33964233a5
1 changed files with 4 additions and 1 deletions
|
@ -162,8 +162,11 @@ ui_link = f"/ui/"
|
|||
ui_message = (
|
||||
f"👉 [```LiteLLM Admin Panel on /ui```]({ui_link}). Create, Edit Keys with SSO"
|
||||
)
|
||||
|
||||
_docs_url = None if os.getenv("NO_DOCS", "False") == "True" else "/"
|
||||
|
||||
app = FastAPI(
|
||||
docs_url="/",
|
||||
docs_url=_docs_url,
|
||||
title="LiteLLM API",
|
||||
description=f"Proxy Server to call 100+ LLMs in the OpenAI format\n\n{ui_message}",
|
||||
version=version,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue