1

The specs:

  • Mobile apps
  • LLM wrapper (of e.g. OpenAI API)
  • The chat history will be stored on the client
  • Backend is needed to manage the api key and to track token consumption / payment (how many tokens does the user/device have left?)

I'm wondering whether "chat history stored on the client" and requiring authentication are possibly incompatible. Does a user expect full sync (use the app on multiple devices)/backups when authenticating?

Otherwise I could use e.g. a device generated UUID to identify the user in the backend, but it's less safe than authentication (e.g. JWT token).

And, well, we could consider too storing the message history in the backend, but we're thinking of making "better privacy" a selling point of the app (though this is of course not 100%, as the messages + summary still go to the OpenAI API) and simplifying development, at least for the start.

Suggestions / opinions?

1 Answer 1

1

This sounds more like a feature decision: Do you want to offer synchronization across multiple devices for a given user? If so, the user should not have to wonder what exact details will be synchronized across devices.

If your application is in the prompt-oriented AI space (as I assume from your description), I'd most likely expect that any input I enter be fully synchronized across devices. After all, that's the experience I have when signing into an AI service — such as ChatGPT, Claude, etc — from different machines.

Does that help you make a decision?

2
  • Sorry for the late reply! The thing is that the data is stored only on the local device. A first question perhaps could be whether this can be sold as better privacy (though of course the requests still go through the OpenAI API.. but are not stored there). And the second question then is if the user login feels overkill for that particular situation. Commented Jun 23 at 4:36
  • Hmm, I'm still not quite sure I get the premise. Is the question whether accessing the chat history should require user auth? 🤔 And what "data" is stored on the specific individual device: The auth data to authenticate user access, or user-oriented data such as that chat history? Commented Jun 26 at 23:45

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.