diff --git a/examples/lightrag_ollama_neo4j_milvus_mongo_demo.py b/examples/lightrag_ollama_neo4j_milvus_mongo_demo.py
index b71489c7..7e2d1026 100644
--- a/examples/lightrag_ollama_neo4j_milvus_mongo_demo.py
+++ b/examples/lightrag_ollama_neo4j_milvus_mongo_demo.py
@@ -44,7 +44,7 @@ rag = LightRAG(
),
kv_storage="MongoKVStorage",
graph_storage="Neo4JStorage",
- vector_storage="MilvusVectorDBStorge",
+ vector_storage="MilvusVectorDBStorage",
)
file = "./book.txt"
diff --git a/examples/lightrag_openai_neo4j_milvus_redis_demo.py b/examples/lightrag_openai_neo4j_milvus_redis_demo.py
index 75e110aa..da5c5a8f 100644
--- a/examples/lightrag_openai_neo4j_milvus_redis_demo.py
+++ b/examples/lightrag_openai_neo4j_milvus_redis_demo.py
@@ -58,7 +58,7 @@ rag = LightRAG(
chunk_overlap_token_size=256,
kv_storage="RedisKVStorage",
graph_storage="Neo4JStorage",
- vector_storage="MilvusVectorDBStorge",
+ vector_storage="MilvusVectorDBStorage",
doc_status_storage="RedisKVStorage",
)
diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py
index 5fff5851..fe52f592 100644
--- a/lightrag/api/lightrag_server.py
+++ b/lightrag/api/lightrag_server.py
@@ -101,7 +101,6 @@ def estimate_tokens(text: str) -> int:
return int(tokens)
-
def get_default_host(binding_type: str) -> str:
default_hosts = {
"ollama": os.getenv("LLM_BINDING_HOST", "http://localhost:11434"),
@@ -249,6 +248,10 @@ def display_splash_screen(args: argparse.Namespace) -> None:
ASCIIColors.yellow(f"{protocol}://localhost:{args.port}/docs")
ASCIIColors.white(" └─ Alternative Documentation (local): ", end="")
ASCIIColors.yellow(f"{protocol}://localhost:{args.port}/redoc")
+ ASCIIColors.white(" ├─ WebUI (local): ", end="")
+ ASCIIColors.yellow(f"{protocol}://localhost:{args.port}/webui")
+ ASCIIColors.white(" ├─ Graph Viewer (local): ", end="")
+ ASCIIColors.yellow(f"{protocol}://localhost:{args.port}/graph-viewer")
ASCIIColors.yellow("\n📝 Note:")
ASCIIColors.white(""" Since the server is running on 0.0.0.0:
@@ -1614,8 +1617,8 @@ def create_app(args):
# query all graph
@app.get("/graphs")
- async def get_graphs(label: str):
- return await rag.get_graps(nodel_label=label, max_depth=100)
+ async def get_knowledge_graph(label: str):
+ return await rag.get_knowledge_graph(nodel_label=label, max_depth=100)
# Add Ollama API routes
ollama_api = OllamaAPI(rag, top_k=args.top_k)
@@ -1653,19 +1656,18 @@ def create_app(args):
},
}
- # webui mount /webui/index.html
- # app.mount(
- # "/webui",
- # StaticFiles(
- # directory=Path(__file__).resolve().parent / "webui" / "static", html=True
- # ),
- # name="webui_static",
- # )
+ # Webui mount webui/index.html
+ webui_dir = Path(__file__).parent / "webui"
+ app.mount(
+ "/graph-viewer",
+ StaticFiles(directory=webui_dir, html=True),
+ name="webui",
+ )
# Serve the static files
static_dir = Path(__file__).parent / "static"
static_dir.mkdir(exist_ok=True)
- app.mount("/", StaticFiles(directory=static_dir, html=True), name="static")
+ app.mount("/webui", StaticFiles(directory=static_dir, html=True), name="static")
return app
diff --git a/lightrag/api/static/index.html b/lightrag/api/static/index.html
index c9659d5e..75b26c5e 100644
--- a/lightrag/api/static/index.html
+++ b/lightrag/api/static/index.html
@@ -98,7 +98,7 @@
-
+