From 9518360021d3a100d7372e8400382e88d00670ca Mon Sep 17 00:00:00 2001 From: choizhang Date: Sat, 29 Mar 2025 23:27:40 +0800 Subject: [PATCH] fix(useLightragGraph): Change the label of the edge from type to keyword --- lightrag_webui/src/hooks/useLightragGraph.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightrag_webui/src/hooks/useLightragGraph.tsx b/lightrag_webui/src/hooks/useLightragGraph.tsx index 2ee28749..92da7189 100644 --- a/lightrag_webui/src/hooks/useLightragGraph.tsx +++ b/lightrag_webui/src/hooks/useLightragGraph.tsx @@ -205,7 +205,7 @@ const createSigmaGraph = (rawGraph: RawGraph | null) => { // Add edges from raw graph data for (const rawEdge of rawGraph?.edges ?? []) { rawEdge.dynamicId = graph.addDirectedEdge(rawEdge.source, rawEdge.target, { - label: rawEdge.type || undefined + label: rawEdge.properties?.keywords || undefined }) } @@ -660,7 +660,7 @@ const useLightrangeGraph = () => { // Add the edge to the sigma graph newEdge.dynamicId = sigmaGraph.addDirectedEdge(newEdge.source, newEdge.target, { - label: newEdge.type || undefined + label: newEdge.properties?.keywords || undefined }); // Add the edge to the raw graph