Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I upload documents with user/group access #2325

Open
moelk-atea opened this issue Feb 5, 2025 · 3 comments
Open

How do I upload documents with user/group access #2325

moelk-atea opened this issue Feb 5, 2025 · 3 comments

Comments

@moelk-atea
Copy link

I have set up my RAGCHAT with the following settings.

1. azd auth login --use-device-code --tenant-id <ENTER THE TENANT-ID>
2. azd new env <rg-name>
3. azd env set DEPLOYMENT_TARGET appservice
4. azd env set AZURE_USE_AUTHENTICATION true
5. azd env set AZURE_ENABLE_GLOBAL_DOCUMENT_ACCESS true
6. azd env set AZURE_AUTH_TENANT_ID <ENTER THE TENANT-ID>
7. azd env set USE_USER_UPLOAD true
8. azd env set ENABLE_LANGUAGE_PICKER true
9. azd up
10. 10. azd env set AZURE_ADLS_GEN2_STORAGE_ACCOUNT <userstorage>
11. python scripts/adlsgen2setup.py 'data' --data-access-control './scripts/sampleacls.json' -v
12. python ./scripts/manageacl.py  -v --acl-action enable_acls
13. python ./scripts/manageacl.py  -v --acl-action update_storage_urls --url https://<NAME_OF_MAIN_STORAGE_ACCOUNT>.blob.core.windows.net/content/

Currently when I upload the documents from the upload button the documents are being uploaded successfully but there are 2 issues.

  1. The oid is being set correctly but other users chat with the document
  2. I'm unable to set which groups that should be able to access the document
@pamelafox
Copy link
Collaborator

  1. When you say that other users are able to chat with the document, can you look at the Thought process tab and see what you see for the filter and what oids you see in the results?
  2. When you say you're unable to set groups, are you using the manageacl.py command to set groups?

@pamelafox pamelafox marked this as a duplicate of #2326 Feb 5, 2025
@moelk-atea
Copy link
Author

moelk-atea commented Feb 6, 2025

  1. I see my oid, I have replaced the contents with mock descriptions.
[
  {
    "id": "SOURCENAME-page-0",
    "content": "CONTENTS",
    "embedding": "[-0.003019939, -0.029972728 ...+1534 more]",
    "imageEmbedding": null,
    "category": null,
    "sourcepage": "2. SOURCENAME.docx",
    "sourcefile": "2. SOURCENAME.docx",
    "oids": [
      "MYOID"
    ],
    "groups": [],
    "captions": [],
    "score": 0.03306011110544205,
    "reranker_score": 2.172471284866333
  },
...]
  1. I have set up the variation of using DataLake gen2 for the document access level, isnt it supposed to tag the documents I upload with my access group? Or do I always need to run manageacl.py after uploading a document to set a group?

EDIT: I tried running the following command but still the group does not appear when looking at the source in Though process:

python ./scripts/manageacl.py --acl-type groups --acl-action add --acl GPTKB_AdminTest --url "https://<USER_STORAGE_ACCOUNT>.blob.core.windows.net/user-content/<MY_OID>/<NAME_OF_FILE>

@pamelafox

  1. When you say that other users are able to chat with the document, can you look at the Thought process tab and see what you see for the filter and what oids you see in the results?
  2. When you say you're unable to set groups, are you using the manageacl.py command to set groups?

@khallissey
Copy link

Has there been any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants