dvcrn / chatgpt-ui

ChatGPT UI with auth, OpenAI, Claude, Gemini support, written in Elixir + LiveView
MIT License
90 stars 17 forks source link

Thoughts on adding database persistence? #6

Open FreedomBen opened 1 year ago

FreedomBen commented 1 year ago

Something I've discovered through use that is a great feature is persistence of chats (i.e. chat history). Have you considered adding storage of chat history in postgres or something beyond the browser?

Just thinking through it a bit, it may require some UI changes since it wouldn't take long until the history was cluttered so might not be a trivial addition, but figured it was worth bringing up.

dvcrn commented 1 year ago

One thing I wanted to do for sure next was storing and syncing with localstorage (or indexeddb), so we store the chat history and things like scenarios into the browser, and sync it to the liveview session state on launch

What would be some situations where a true database layer on the serverside may be beneficial?