Set default max_depth to 3 for knowledge graph retrieval
This commit is contained in:
parent
6d5c04d561
commit
5942d148f0
2 changed files with 2 additions and 2 deletions
|
|
@ -204,7 +204,7 @@ class BaseGraphStorage(StorageNameSpace, ABC):
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
async def get_knowledge_graph(
|
async def get_knowledge_graph(
|
||||||
self, node_label: str, max_depth: int = 5
|
self, node_label: str, max_depth: int = 3
|
||||||
) -> KnowledgeGraph:
|
) -> KnowledgeGraph:
|
||||||
"""Retrieve a subgraph of the knowledge graph starting from a given node."""
|
"""Retrieve a subgraph of the knowledge graph starting from a given node."""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -506,7 +506,7 @@ class LightRAG:
|
||||||
async def get_knowledge_graph(
|
async def get_knowledge_graph(
|
||||||
self,
|
self,
|
||||||
node_label: str,
|
node_label: str,
|
||||||
max_depth: int,
|
max_depth: int = 3,
|
||||||
min_degree: int = 0,
|
min_degree: int = 0,
|
||||||
inclusive: bool = False,
|
inclusive: bool = False,
|
||||||
) -> KnowledgeGraph:
|
) -> KnowledgeGraph:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue