From facf7c11fe108819e3007576f4b7cd6c8f4c44ee Mon Sep 17 00:00:00 2001 From: yangdx Date: Mon, 24 Feb 2025 03:34:44 +0800 Subject: [PATCH] Reduce knowledge graph max_depth from 100 to 3 --- lightrag/api/routers/graph_routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/api/routers/graph_routes.py b/lightrag/api/routers/graph_routes.py index 38d9dbb7..28a5561a 100644 --- a/lightrag/api/routers/graph_routes.py +++ b/lightrag/api/routers/graph_routes.py @@ -22,6 +22,6 @@ def create_graph_routes(rag, api_key: Optional[str] = None): @router.get("/graphs", dependencies=[Depends(optional_api_key)]) async def get_knowledge_graph(label: str): """Get knowledge graph for a specific label""" - return await rag.get_knowledge_graph(node_label=label, max_depth=100) + return await rag.get_knowledge_graph(node_label=label, max_depth=3) return router