From f29628125b348c355bc61f05361c94d624bb37e9 Mon Sep 17 00:00:00 2001 From: yangdx Date: Mon, 24 Feb 2025 02:36:36 +0800 Subject: [PATCH] Fix typo in parameter name from 'nodel_label' to 'node_label' --- lightrag/api/routers/graph_routes.py | 2 +- lightrag/lightrag.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lightrag/api/routers/graph_routes.py b/lightrag/api/routers/graph_routes.py index bfdb838c..38d9dbb7 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(nodel_label=label, max_depth=100) + return await rag.get_knowledge_graph(node_label=label, max_depth=100) return router diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index fa39db59..46638243 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -466,10 +466,10 @@ class LightRAG: return text async def get_knowledge_graph( - self, nodel_label: str, max_depth: int + self, node_label: str, max_depth: int ) -> KnowledgeGraph: return await self.chunk_entity_relation_graph.get_knowledge_graph( - node_label=nodel_label, max_depth=max_depth + node_label=node_label, max_depth=max_depth ) def _get_storage_class(self, storage_name: str) -> Callable[..., Any]: