Hacker News new | ask | show | jobs
by zbycz 170 days ago
If you download a Data export, the timestamps are there for every conversation, and often for messages as well.

The html file is just a big JSON with some JS rendering, so I wrote this bash script which adds the timestamp before the conversation title:

  sed -i 's|"<h4>" + conversation.title + "</h4>"|"<h4>" + new Date(conversation.create_time*1000).toISOString().slice(0, 10) + " @ " + conversation.title + "</h4>"|' chat.html
3 comments

This is a bit of sidetrack, but in case someone is interested in reading their history more easily. My conversations.html export file was ~200 MiB and I wanted something easier to work with, so I've been working on a project to index and make it searchable.

It uses the pagefind project so it can be hosted on a static host, and I made a fork of pagefind which encrypts the indexes so you can host your private chats wherever and it will be encrypted at rest and decrypted client-side in the browser.

(You still have to trust the server as the html itself can be modified, but at least your data is encrypted at rest.)

One of the goals is to allow me to delete all my data from chatgpt and claude regularly while still having a private searchable history.

It's early but the basics work, and it can handle both chatgpt and claude (which is another benefit as I don't always remember where I had something).

https://github.com/gnyman/llm-history-search

Seems we have a common goal here of being able to search history on ChatGPT/Claude.

Check this project I've been working on which allows you to use your browser to do the same, everything being client-side.

https://github.com/TomzxCode/llm-conversations-viewer

Curious to get your experience trying it!

Do you know if this is available in the actual web interface, and just not displayed, or is it just in the data export? If it is in the web, maybe a browser extension would be worth making.
I checked, and yes - the field "create_time" is available both for coversation and for each message. The payload looks the same as the exported JSON.

Look for this API call in Dev Tools: https://chatgpt.com/backend-api/conversation/<uuid>

There's a github project which converts them to markdown which works fairly well too.