yangdx
commited on
Commit
·
dd6e078
1
Parent(s):
04f74ef
Update comments of get_knowledge_graph func for Noe4j
Browse files
lightrag/kg/neo4j_impl.py
CHANGED
@@ -651,16 +651,15 @@ class Neo4JStorage(BaseGraphStorage):
|
|
651 |
) -> KnowledgeGraph:
|
652 |
"""
|
653 |
Retrieve a connected subgraph of nodes where the label includes the specified `node_label`.
|
654 |
-
Maximum number of nodes is constrained by the environment variable `MAX_GRAPH_NODES` (default: 1000).
|
655 |
When reducing the number of nodes, the prioritization criteria are as follows:
|
656 |
-
1.
|
657 |
-
2. Followed by
|
658 |
-
3. Finally, the degree of the nodes
|
659 |
|
660 |
Args:
|
661 |
node_label: Label of the starting node
|
662 |
-
max_depth: Maximum depth of the subgraph
|
663 |
-
|
|
|
664 |
Returns:
|
665 |
KnowledgeGraph: Complete connected subgraph for specified node
|
666 |
"""
|
|
|
651 |
) -> KnowledgeGraph:
|
652 |
"""
|
653 |
Retrieve a connected subgraph of nodes where the label includes the specified `node_label`.
|
|
|
654 |
When reducing the number of nodes, the prioritization criteria are as follows:
|
655 |
+
1. Hops(path) to the staring node take precedence
|
656 |
+
2. Followed by the degree of the nodes
|
|
|
657 |
|
658 |
Args:
|
659 |
node_label: Label of the starting node
|
660 |
+
max_depth: Maximum depth of the subgraph, Defaults to 3
|
661 |
+
max_nodes: Maxiumu nodes to return
|
662 |
+
|
663 |
Returns:
|
664 |
KnowledgeGraph: Complete connected subgraph for specified node
|
665 |
"""
|