Set default max_depth to 3 for knowledge graph retrieval

This commit is contained in:
yangdx
2025-03-07 07:34:29 +08:00
parent 6d5c04d561
commit 5942d148f0
2 changed files with 2 additions and 2 deletions

View File

@@ -204,7 +204,7 @@ class BaseGraphStorage(StorageNameSpace, ABC):
@abstractmethod
async def get_knowledge_graph(
self, node_label: str, max_depth: int = 5
self, node_label: str, max_depth: int = 3
) -> KnowledgeGraph:
"""Retrieve a subgraph of the knowledge graph starting from a given node."""

View File

@@ -506,7 +506,7 @@ class LightRAG:
async def get_knowledge_graph(
self,
node_label: str,
max_depth: int,
max_depth: int = 3,
min_degree: int = 0,
inclusive: bool = False,
) -> KnowledgeGraph: