feat: sponsor custom name support

This commit is contained in:
Timothy J. Baek 2024-02-23 17:12:19 -08:00
parent fc330a1e8b
commit 62f67bed29
17 changed files with 94 additions and 44 deletions

View file

@ -20,7 +20,7 @@ from apps.rag.main import app as rag_app
from apps.web.main import app as webui_app
from config import ENV, VERSION, CHANGELOG, FRONTEND_BUILD_DIR
from config import WEBUI_NAME, ENV, VERSION, CHANGELOG, FRONTEND_BUILD_DIR
class SPAStaticFiles(StaticFiles):
@ -72,6 +72,7 @@ async def get_app_config():
return {
"status": True,
"name": WEBUI_NAME,
"version": VERSION,
"images": images_app.state.ENABLED,
"default_models": webui_app.state.DEFAULT_MODELS,
@ -84,6 +85,9 @@ async def get_app_changelog():
return CHANGELOG
app.mount("/static", StaticFiles(directory="static"), name="static")
app.mount(
"/",
SPAStaticFiles(directory=FRONTEND_BUILD_DIR, html=True),