Skip to content

Commit 8629fc3

Browse files
committed
Update working-memory.md
1 parent 43ad96b commit 8629fc3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/working-memory.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,28 @@ import ulid
4848
from datetime import datetime, UTC
4949

5050
# Store conversation messages for context continuity
51-
# IMPORTANT: Always provide created_at timestamps for accurate message ordering
51+
# IMPORTANT: Provide created_at timestamps that reflect actual message creation times
52+
# In real usage, each message would have its own timestamp from when it was created
5253
working_memory = WorkingMemory(
5354
session_id="chat_123",
5455
messages=[
5556
MemoryMessage(
5657
role="user",
5758
content="I'm planning a trip to Paris next month",
5859
id=ulid.ULID(),
59-
created_at=datetime.now(UTC) # Provide timestamp
60+
created_at=datetime.fromisoformat("2024-01-15T10:30:00+00:00")
6061
),
6162
MemoryMessage(
6263
role="assistant",
6364
content="That sounds exciting! What type of activities are you interested in?",
6465
id=ulid.ULID(),
65-
created_at=datetime.now(UTC)
66+
created_at=datetime.fromisoformat("2024-01-15T10:30:05+00:00")
6667
),
6768
MemoryMessage(
6869
role="user",
6970
content="I love museums and good food",
7071
id=ulid.ULID(),
71-
created_at=datetime.now(UTC)
72+
created_at=datetime.fromisoformat("2024-01-15T10:30:30+00:00")
7273
)
7374
]
7475
)

0 commit comments

Comments
 (0)