yangdx commited on
Commit
c20c1d8
·
1 Parent(s): 18efa1c

Fix relation info in kownledge graph UI

Browse files
lightrag/api/webui/assets/{index-CJz72b6Q.js → index-BCtjO3U7.js} RENAMED
Binary files a/lightrag/api/webui/assets/index-CJz72b6Q.js and b/lightrag/api/webui/assets/index-BCtjO3U7.js differ
 
lightrag/api/webui/index.html CHANGED
Binary files a/lightrag/api/webui/index.html and b/lightrag/api/webui/index.html differ
 
lightrag/kg/neo4j_impl.py CHANGED
@@ -744,11 +744,7 @@ class Neo4JStorage(BaseGraphStorage):
744
  result.nodes.append(
745
  KnowledgeGraphNode(
746
  id=f"{node_id}",
747
- labels=[
748
- label
749
- for label in node.labels
750
- if label != "base"
751
- ],
752
  properties=dict(node),
753
  )
754
  )
@@ -865,9 +861,7 @@ class Neo4JStorage(BaseGraphStorage):
865
  # Create KnowledgeGraphNode for target
866
  target_node = KnowledgeGraphNode(
867
  id=f"{target_id}",
868
- labels=[
869
- label for label in b_node.labels if label != "base"
870
- ],
871
  properties=dict(b_node.properties),
872
  )
873
 
@@ -907,9 +901,7 @@ class Neo4JStorage(BaseGraphStorage):
907
  # Create initial KnowledgeGraphNode
908
  start_node = KnowledgeGraphNode(
909
  id=f"{node_record['n'].get('entity_id')}",
910
- labels=[
911
- label for label in node_record["n"].labels if label != "base"
912
- ],
913
  properties=dict(node_record["n"].properties),
914
  )
915
  finally:
 
744
  result.nodes.append(
745
  KnowledgeGraphNode(
746
  id=f"{node_id}",
747
+ labels=[node.get("entity_id")],
 
 
 
 
748
  properties=dict(node),
749
  )
750
  )
 
861
  # Create KnowledgeGraphNode for target
862
  target_node = KnowledgeGraphNode(
863
  id=f"{target_id}",
864
+ labels=list(f"{target_id}"),
 
 
865
  properties=dict(b_node.properties),
866
  )
867
 
 
901
  # Create initial KnowledgeGraphNode
902
  start_node = KnowledgeGraphNode(
903
  id=f"{node_record['n'].get('entity_id')}",
904
+ labels=list(f"{node_record['n'].get('entity_id')}"),
 
 
905
  properties=dict(node_record["n"].properties),
906
  )
907
  finally:
lightrag_webui/src/components/graph/PropertiesView.tsx CHANGED
@@ -95,9 +95,9 @@ const refineNodeProperties = (node: RawNodeType): NodeType => {
95
  const neighbour = state.rawGraph.getNode(neighbourId)
96
  if (neighbour) {
97
  relationships.push({
98
- type: isTarget ? 'Target' : 'Source',
99
  id: neighbourId,
100
- label: neighbour.labels.join(', ')
101
  })
102
  }
103
  }
 
95
  const neighbour = state.rawGraph.getNode(neighbourId)
96
  if (neighbour) {
97
  relationships.push({
98
+ type: 'Target',
99
  id: neighbourId,
100
+ label: neighbour.properties['entity_id']
101
  })
102
  }
103
  }