How to implement user preferences

I am looking to implement user preferences in my workshop / OSDK application whereby a user can select their preferred LLM model which is then saved to the Ontology so when they return to the app later, their preferred LLM model is already selected for use.

How should I go about creating this feature? I was thinking that I could create a separate user object specifically for this app and store the user preferences there. But that would mean that I would somehow have to create a new user object when someone new enters the app, whereas I’d much rather be able to associate preferences with users across the enrollment without dealing with creating new objects.

Also, how can I access the current user’s multipass attributes in a React OSDK application?

1 Like

Great question.

I usually create such an object type, which captures user preferences. An easy solution (which translates across your entire stack) to your problem is to check whether there’s an existing object linked to the user’s multipassid, and if not, fetch the settings from a default object.

You should be able to get the attribute from either the osdk auth or client library.

I also was advised to have my actions be upserts so that if a user object doesn’t exist, the action will create the user object and add the preference while if the user object does exist, it just updates the preference

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.