mount graph viewer webui in /webui endpoint
This commit is contained in:
@@ -123,6 +123,7 @@ if mongo_uri:
|
|||||||
rag_storage_config.DOC_STATUS_STORAGE = "MongoKVStorage"
|
rag_storage_config.DOC_STATUS_STORAGE = "MongoKVStorage"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_default_host(binding_type: str) -> str:
|
def get_default_host(binding_type: str) -> str:
|
||||||
default_hosts = {
|
default_hosts = {
|
||||||
"ollama": os.getenv("LLM_BINDING_HOST", "http://localhost:11434"),
|
"ollama": os.getenv("LLM_BINDING_HOST", "http://localhost:11434"),
|
||||||
@@ -1451,14 +1452,13 @@ def create_app(args):
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
# webui mount /webui/index.html
|
# Webui mount graph_viewer_webui/dist/index.html
|
||||||
# app.mount(
|
webui_dir = Path(__file__).parent / "graph_viewer_webui" / "dist"
|
||||||
# "/webui",
|
app.mount(
|
||||||
# StaticFiles(
|
"/webui",
|
||||||
# directory=Path(__file__).resolve().parent / "webui" / "static", html=True
|
StaticFiles(directory=webui_dir, html=True),
|
||||||
# ),
|
name="webui_static",
|
||||||
# name="webui_static",
|
)
|
||||||
# )
|
|
||||||
|
|
||||||
# Serve the static files
|
# Serve the static files
|
||||||
static_dir = Path(__file__).parent / "static"
|
static_dir = Path(__file__).parent / "static"
|
||||||
|
Reference in New Issue
Block a user