(fix) proxy - improve swagger admin ui message

This commit is contained in:
ishaan-jaff 2024-01-31 20:01:39 -08:00
parent cfbafb4a5a
commit cbb94a77ff

View file

@ -116,10 +116,14 @@ from typing import Union
proxy_base_url = os.getenv("PROXY_BASE_URL", None)
ui_link = f"/ui?proxyBaseUrl={proxy_base_url}"
ui_message = f"👉 [LiteLLM Admin Panel on /ui]({ui_link}). Create, Edit Keys with SSO"
if proxy_base_url is None:
ui_message = "👉 LiteLLM Admin Panel - 'PROXY_BASE_URL' not set in env, see [UI docs](https://docs.litellm.ai/docs/proxy/ui)"
app = FastAPI(
docs_url="/",
title="LiteLLM API",
description=f"Proxy Server to call 100+ LLMs in the OpenAI format\n\n👉 [LiteLLM Admin Panel on /ui]({ui_link}). Create, Edit Keys with SSO",
description=f"Proxy Server to call 100+ LLMs in the OpenAI format\n\n{ui_message}",
)