fix: preserve custom metadata when updating memory (#4495)

This commit is contained in:
Kartik
2026-03-24 10:58:21 +05:30
committed by GitHub
parent bda5b726bd
commit 5431badfd4
2 changed files with 47 additions and 2 deletions
+2 -1
View File
@@ -197,7 +197,8 @@ class MongoDB(VectorStoreBase):
if vector is not None:
update_fields["embedding"] = vector
if payload is not None:
update_fields["payload"] = payload
for key, value in payload.items():
update_fields[f"payload.{key}"] = value
if update_fields:
try: