chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

Chainlit data layer doesn't handle `createdAt` very well

Open j-z10 opened this issue 7 months ago • 0 comments
trafficstars

Describe the bug Unable to update Stepdict in the database. The issue seems to be here, where datetime.isoformat() does not include a Z suffix. However, here, the system attempts to parse it using ISO_FORMAT, which expects the format "%Y-%m-%dT%H:%M:%S.%fZ".

To Reproduce Steps to reproduce the behavior:

  1. Enable the default Chainlit data layer and define on_chat_resume to allow message editing within a thread.
  2. Start the server, create a thread, and chat through multiple rounds.
  3. Restart the server (this step is crucial).
  4. Locate the previous chat thread and edit one of the queries. This triggers an error in the terminal, but the UI still generates a new response.
  5. Refresh the page—the new response fails to save.

Expected behavior The following messages should be deleted, and the new response should be correctly displayed and saved in the database.

Screenshots Image

j-z10 avatar Apr 02 '25 10:04 j-z10