forked from phoenix/litellm-mirror
(fix) ui - use custom logo
This commit is contained in:
parent
9ba2fa44aa
commit
7be3ea021d
1 changed files with 5 additions and 1 deletions
|
@ -5197,7 +5197,11 @@ def get_image():
|
||||||
"""Get logo to show on admin UI"""
|
"""Get logo to show on admin UI"""
|
||||||
from fastapi.responses import FileResponse
|
from fastapi.responses import FileResponse
|
||||||
|
|
||||||
logo_path = os.getenv("UI_LOGO_PATH", "./logo.jpg")
|
# get current_dir
|
||||||
|
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
default_logo = os.path.join(current_dir, "logo.jpg")
|
||||||
|
|
||||||
|
logo_path = os.getenv("UI_LOGO_PATH", default_logo)
|
||||||
verbose_proxy_logger.debug(f"Reading logo from {logo_path}")
|
verbose_proxy_logger.debug(f"Reading logo from {logo_path}")
|
||||||
return FileResponse(path=logo_path)
|
return FileResponse(path=logo_path)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue