ztjhz / BetterChatGPT

An amazing UI for OpenAI's ChatGPT (Website + Windows + MacOS + Linux)
http://bettergpt.chat/
Creative Commons Zero v1.0 Universal
8.04k stars 2.72k forks source link

Sync to Google Drive from multiple devices #259

Open stdedos opened 1 year ago

stdedos commented 1 year ago

What is the limitation for that? image

I tried to read through https://github.com/ztjhz/BetterChatGPT/pull/233, but it's a little big for me to consume 😓

It seems that you can store things as files in a folder https://developers.google.com/drive/api/guides/appdata

I'd personally take the hit of having multiple chats (to avoid for having to implement a merge-conflict resolution methodology), if that meant I can access my chats via multiple places (I'd need 2 devices right now)

ztjhz commented 1 year ago

The problem is that Better ChatGPT is a client-only app and does not have a server. When syncing data to the cloud, multiple clients may be modifying the same data simultaneously, which can cause merge conflicts. If each client handles the conflict resolution on its own, it can result in inconsistent changes to the data and even data loss. So it is better to handle merge conflicts on the server side where the authoritative version of the data exists. This way, the server can apply a consistent resolution to the conflict and ensure that the data remains consistent and accurate across all clients. But, Better ChatGPT does not have a server to do that.

RodolfoCastanheira commented 1 year ago

What do you think about locking the current in use conversation? Maybe we'd need another lock or two for some operations, but it seems that it's possible to make that work almost all the time.

A more robust option may be to use git to do merging for us in the browser: https://github.com/isomorphic-git/isomorphic-git

endolith commented 1 year ago

And why do we have to re-connect to Google every hour? It should just stay connected forever.

AETHER-ENGINEERS commented 1 year ago

That could be on the Google Oauth2 side. YouTube uses Google Oauth2 for streaming from nVidia ShadowPlay and disconnects every four to ten hours and also I think there may be some API rate limiting involved.

endolith commented 1 year ago

I mean this:

Note: You will need to re-login on every visit or every hour. To avoid your cloud data being overwritten, do not use BetterChatGPT on more than one device at the same time.

It would be nice if it actually synced instead of overwriting the local chats. I export them first, sync, then import them.