Setting User Permissions
When using ReLLM a user is only given access to data that they have the permission to view. In order to provide this, ReLLM needs you to set the user's permissions. This is done via the permissions api.
- URL: https://rellm.ai/api/permission (opens in a new tab)
- Method: POST
- Headers:
- Authorization: Bearer "Your api token"
- data:
- user_id: string representation of your user, ie: user id
- permission: arbitrary permission bit to grant access to
The permission bit will allow this user to access embedding data protected by the permission bit.
JS Package
import ReLLM from "rellm";
const rellm = new ReLLM(process.env.RELLM_API_KEY)
rellm.setPermission(user_id, permission)