Skip to content

Commit

Permalink
fixed graphvis api;
Browse files Browse the repository at this point in the history
  • Loading branch information
KingSkyLi authored and M1n9X committed Aug 28, 2024
1 parent 3473504 commit 2f8822c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dbgpt/app/knowledge/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,13 +646,14 @@ def query_graph(self, space_name, limit):
graph = vector_store_connector.client.query_graph(limit=limit)
res = {"nodes": [], "edges": []}
for node in graph.vertices():
res["nodes"].append({"vid": node.vid})
res["nodes"].append({"vid": node.vid,"communityId":node.get_prop('_community_id'),"props":node.props})
for edge in graph.edges():
res["edges"].append(
{
"src": edge.sid,
"dst": edge.tid,
"label": edge.name,
"props":edge.props
}
)
return res

0 comments on commit 2f8822c

Please sign in to comment.