Skip to content

Commit 6586389

Browse files
committed
feat: update embedding
1 parent b3e3bef commit 6586389

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/memos/graph_dbs/polardb.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,13 +1160,11 @@ def get_nodes(
11601160
properties = properties_json if properties_json else {}
11611161

11621162
# Parse embedding from JSONB if it exists
1163-
if embedding_json is not None:
1163+
if embedding_json is not None and kwargs.get("include_embedding"):
11641164
try:
11651165
# remove embedding
1166-
"""
11671166
embedding = json.loads(embedding_json) if isinstance(embedding_json, str) else embedding_json
1168-
# properties["embedding"] = embedding
1169-
"""
1167+
properties["embedding"] = embedding
11701168
except (json.JSONDecodeError, TypeError):
11711169
logger.warning(f"Failed to parse embedding for node {node_id}")
11721170
nodes.append(

0 commit comments

Comments
 (0)