(feat) ui - show custom logo

This commit is contained in:
ishaan-jaff 2024-02-21 16:33:44 -08:00
parent 6720ec5c1f
commit 03cb0b216d
3 changed files with 12 additions and 1 deletions

BIN
litellm/proxy/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View file

@ -5045,6 +5045,11 @@ async def login(request: Request):
)
@app.get("/get_image", include_in_schema=False)
def get_image():
return FileResponse(path="./logo.png")
@app.get("/sso/callback", tags=["experimental"])
async def auth_callback(request: Request):
"""Verify login"""

View file

@ -25,13 +25,19 @@ const Navbar: React.FC<NavbarProps> = ({ userID, userRole, userEmail }) => {
console.log("User ID:", userID);
console.log("userEmail:", userEmail);
// const userColors = require('./ui_colors.json') || {};
const isLocal = process.env.NODE_ENV === "development";
const imageUrl = isLocal ? "http://localhost:4000/get_image" : "/get_image";
return (
<nav className="left-0 right-0 top-0 flex justify-between items-center h-12 mb-4">
<div className="text-left mx-4 my-2 absolute top-0 left-0">
<div className="flex flex-col items-center">
<Link href="/">
<button className="text-gray-800 text-2xl px-4 py-1 rounded text-center">
🚅 LiteLLM
<img src={imageUrl} width={50} height={50} alt="LiteLLM Brand" className="mr-2" />
LiteLLM
</button>
</Link>
</div>