From cbb94a77ff09a73d0fc7e55f6483e1640d959a51 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Wed, 31 Jan 2024 20:01:39 -0800 Subject: [PATCH] (fix) proxy - improve swagger admin ui message --- litellm/proxy/proxy_server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index a921a774f..51b54f2d2 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -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}", )