Open santiarias opened 1 year ago
I think you can achieve that by using setting up row level security. Add new RLS to your documents table with following USING and WHERE expression:
((auth.uid())::text = (metadata ->> 'user'::text))
and my metadata contains user
field with users uuid
metadata: {
'user': 'e1965a54-4760-4....'
}
Thanks yeah that is my plan too.
I'm also searching for a solution to this. I want to allow users to further narrow down what documents they want to search over. I could not find any existing way for this in the current supabase VectorStore implementation here. I guess one would need to raise a PR in the langchain main repo for this?
Hi, there is an open PR in the main repo enabling this which we plan to merge and release soon https://github.com/hwchase17/langchainjs/pull/905
I want to add userId to documents table so vectorStore only retrieves documents for that userId, any ideas?