mirror of
https://gitcode.com/JianFeeeee/TrulyMEM-TrueHumanMEM.git
synced 2026-09-21 17:38:18 +00:00
fix: 修复 recall 返回值变量名 other->t
This commit is contained in:
@ -203,15 +203,15 @@ class Neo4jGraph:
|
|||||||
entities, relations = {}, []
|
entities, relations = {}, []
|
||||||
|
|
||||||
for record in result:
|
for record in result:
|
||||||
e, r, other = record["e"], record["r"], record["other"]
|
e, r, t = record["e"], record["r"], record["t"]
|
||||||
if e["name"] not in entities:
|
if e["name"] not in entities:
|
||||||
entities[e["name"]] = {"name": e["name"], "type": e.get("type", "unknown"), "mention_count": e.get("mention_count", 1)}
|
entities[e["name"]] = {"name": e["name"], "type": e.get("type", "unknown"), "mention_count": e.get("mention_count", 1)}
|
||||||
if other["name"] not in entities:
|
if t["name"] not in entities:
|
||||||
entities[other["name"]] = {"name": other["name"], "type": other.get("type", "unknown"), "mention_count": other.get("mention_count", 1)}
|
entities[t["name"]] = {"name": t["name"], "type": t.get("type", "unknown"), "mention_count": t.get("mention_count", 1)}
|
||||||
|
|
||||||
relations.append({
|
relations.append({
|
||||||
"source": e["name"],
|
"source": e["name"],
|
||||||
"target": other["name"],
|
"target": t["name"],
|
||||||
"type": r["type"],
|
"type": r["type"],
|
||||||
"created_at": str(r.get("created_at", "")),
|
"created_at": str(r.get("created_at", "")),
|
||||||
"session_id": r.get("session_id", ""),
|
"session_id": r.get("session_id", ""),
|
||||||
|
|||||||
Reference in New Issue
Block a user