Fix: use caller-provided timestamp for memory created_at instead of always using datetime.now()
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
a6130c5436
commit
90f9e6a550
+1
-1
@@ -625,7 +625,7 @@ class Memory(MemoryBase):
|
||||
mem_metadata["data"] = text
|
||||
mem_metadata["text_lemmatized"] = text_lemmatized
|
||||
mem_metadata["hash"] = mem_hash
|
||||
mem_metadata["created_at"] = datetime.now(pytz.timezone("US/Pacific")).isoformat()
|
||||
mem_metadata["created_at"] = timestamp if timestamp is not None else datetime.now(pytz.timezone("US/Pacific")).isoformat()
|
||||
if mem.get("attributed_to"):
|
||||
mem_metadata["attributed_to"] = mem["attributed_to"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user