Skip to content

Commit

Permalink
Merge pull request #1 from cpacker/main
Browse files Browse the repository at this point in the history
fix: Update static_files.py (cpacker#1340)
  • Loading branch information
madgrizzle committed May 7, 2024
2 parents 0a4adcb + f1f912d commit bdcd993
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion memgpt/server/rest_api/static_files.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import importlib.util
import os

from fastapi import FastAPI, HTTPException
Expand All @@ -17,7 +18,7 @@ async def get_response(self, path: str, scope):


def mount_static_files(app: FastAPI):
static_files_path = os.path.join(os.getcwd(), "memgpt", "server", "static_files")
static_files_path = os.path.join(os.path.dirname(importlib.util.find_spec("memgpt").origin), "server", "static_files")
if os.path.exists(static_files_path):
app.mount(
"/",
Expand Down

0 comments on commit bdcd993

Please sign in to comment.