-
Notifications
You must be signed in to change notification settings - Fork 178
Open
Description
>>> import memobase
m>>> memobase.__version__
'0.0.24'
>>> from memobase import ChatBlob
>>> from datetime import datetime
>>> timestamp = datetime(2025, 9, 1)
>>> b = ChatBlob(messages=[
... {"role": "user", "content": "Hi, I'm here again"},
... {"role": "assistant", "content": "Hi, Gus! How can I help you?"}
... ], created_at=timestamp)
>>> b.to_request()
{'blob_type': <BlobType.chat: 'chat'>, 'fields': None, 'blob_data': {'messages': [{'role': 'user', 'content': "Hi, I'm here again", 'alias': None, 'created_at': None}, {'role': 'assistant', 'content': 'Hi, Gus! How can I help you?', 'alias': None, 'created_at': None}]}}The generated request body sets created_at to None. This field is excluded during model_dump() according to this line of code. As the result, the created_at (and updated_at) fields defined in the API are not accessible through the Python SDK directly.
Metadata
Metadata
Assignees
Labels
No labels