Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: only attempt to mount static files dir (for chatUI) if already generated (#991)
Charles Packer50bd52a3039a
diff --git a/memgpt/server/rest_api/static_files.py b/memgpt/server/rest_api/static_files.pyindex 342e8ed0b..4d836cdaf 100644--- a/memgpt/server/rest_api/static_files.py+++ b/memgpt/server/rest_api/static_files.py@@ -17,11 +17,13 @@ class SPAStaticFiles(StaticFiles):def mount_static_files(app: FastAPI):- app.mount(- "/",- SPAStaticFiles(- directory=os.path.join(os.getcwd(), "memgpt", "server", "static_files"),- html=True,- ),- name="spa-static-files",- )+ static_files_path = os.path.join(os.getcwd(), "memgpt", "server", "static_files")+ if os.path.exists(static_files_path):+ app.mount(+ "/",+ SPAStaticFiles(+ directory=static_files_path,+ html=True,+ ),+ name="spa-static-files",+ )