Reduce max_depth and update edge type in NetworkXStorage.
- Decreased max_depth from 5 to 3 - Changed edge type from "RELATED" to "DIRECTED"
This commit is contained in:
@@ -234,7 +234,7 @@ class NetworkXStorage(BaseGraphStorage):
|
|||||||
async def get_knowledge_graph(
|
async def get_knowledge_graph(
|
||||||
self,
|
self,
|
||||||
node_label: str,
|
node_label: str,
|
||||||
max_depth: int = 5,
|
max_depth: int = 3,
|
||||||
min_degree: int = 0,
|
min_degree: int = 0,
|
||||||
inclusive: bool = False,
|
inclusive: bool = False,
|
||||||
) -> KnowledgeGraph:
|
) -> KnowledgeGraph:
|
||||||
@@ -250,8 +250,8 @@ class NetworkXStorage(BaseGraphStorage):
|
|||||||
Args:
|
Args:
|
||||||
node_label: Label of the starting node
|
node_label: Label of the starting node
|
||||||
max_depth: Maximum depth of the subgraph
|
max_depth: Maximum depth of the subgraph
|
||||||
search_mode (str, optional): Search mode, either "exact" or "inclusive". Defaults to "exact".
|
min_degree: Minimum degree of nodes to include. Defaults to 0
|
||||||
min_degree (int, optional): Minimum degree of nodes to include. Defaults to 0.
|
inclusive: Do an inclusive search if true
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
KnowledgeGraph object containing nodes and edges
|
KnowledgeGraph object containing nodes and edges
|
||||||
@@ -383,7 +383,7 @@ class NetworkXStorage(BaseGraphStorage):
|
|||||||
result.edges.append(
|
result.edges.append(
|
||||||
KnowledgeGraphEdge(
|
KnowledgeGraphEdge(
|
||||||
id=edge_id,
|
id=edge_id,
|
||||||
type="RELATED",
|
type="DIRECTED",
|
||||||
source=str(source),
|
source=str(source),
|
||||||
target=str(target),
|
target=str(target),
|
||||||
properties=edge_data,
|
properties=edge_data,
|
||||||
|
Reference in New Issue
Block a user