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

Update buv #2167

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
docker:
remoteBuild: true
# Please check docs/azure_app_service.md for more information on how to deploy to Azure App Service
# host: appservice
#host: appservice
hooks:
# This hook is called when App Service is the host
prepackage:
Expand Down
Binary file added data/2. BUV-OCT24-FREQUENTLY ASKED QUESTIONS.pdf
Binary file not shown.
Binary file added data/3. SU-OCT24-FREQUENTLY ASKED QUESTIONS.pdf
Binary file not shown.
Binary file added data/7. PSG Programme Handbook_Oct 2024.pdf
Binary file not shown.
Binary file added data/8. Student Handbook 2024-2025 - Oct 2024.pdf
Binary file not shown.
Binary file removed data/Benefit_Options.pdf
Binary file not shown.
48 changes: 0 additions & 48 deletions data/Contoso_Electronics_Company_Overview.md

This file was deleted.

Binary file removed data/Northwind_Health_Plus_Benefits_Details.pdf
Binary file not shown.
Binary file removed data/Northwind_Standard_Benefits_Details.pdf
Binary file not shown.
Binary file removed data/PerksPlus.pdf
Binary file not shown.
Binary file removed data/employee_handbook.pdf
Binary file not shown.
Binary file removed data/role_library.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/login_and_acl.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The easiest way to setup the two apps is to use the `azd` CLI. We've written scr
1. (Optional) To require access control when using the app, run `azd env set AZURE_ENFORCE_ACCESS_CONTROL true`. Authentication is always required to search on documents with access control assigned, regardless of if unauthenticated access is enabled or not.
1. (Optional) To allow authenticated users to search on documents that have no access controls assigned, even when access control is required, run `azd env set AZURE_ENABLE_GLOBAL_DOCUMENT_ACCESS true`.
1. (Optional) To allow unauthenticated users to use the app, even when access control is enforced, run `azd env set AZURE_ENABLE_UNAUTHENTICATED_ACCESS true`. `AZURE_ENABLE_GLOBAL_DOCUMENT_ACCESS` should also be set to true if you want unauthenticated users to be able to search on documents with no access control.
1. Run `azd env set AZURE_AUTH_TENANT_ID <YOUR-TENANT-ID>` to set the tenant ID associated with authentication.
1. Run `azd env set AZURE_AUTH_TENANT_ID 9f820e47-621b-4f31-8927-57d2ef4725af` to set the tenant ID associated with authentication.
1. If your auth tenant ID is different from your currently logged in tenant ID, run `azd auth login --tenant-id <YOUR-TENANT-ID>` to login to the authentication tenant simultaneously.
1. Run `azd up` to deploy the app.

Expand Down Expand Up @@ -241,12 +241,12 @@ The script supports the following commands. All commands support `-v` for verbos

[Azure Data Lake Storage Gen2](https://learn.microsoft.com/azure/storage/blobs/data-lake-storage-introduction) implements an [access control model](https://learn.microsoft.com/azure/storage/blobs/data-lake-storage-access-control) that can be used for document level access control. The [adlsgen2setup.py](/scripts/adlsgen2setup.py) script uploads the sample data included in the [data](./data) folder to a Data Lake Storage Gen2 storage account. The [Storage Blob Data Owner](https://learn.microsoft.com/azure/storage/blobs/data-lake-storage-access-control-model#role-based-access-control-azure-rbac) role is required to use the script.

In order to use this script, an existing Data Lake Storage Gen2 storage account is required. Run `azd env set AZURE_ADLS_GEN2_STORAGE_ACCOUNT <your-storage-account>` prior to running the script.
In order to use this script, an existing Data Lake Storage Gen2 storage account is required. Run `azd env set AZURE_ADLS_GEN2_STORAGE_ACCOUNT stjoshh2jzxm5iq` prior to running the script.

Then run the script inside your Python environment:

```shell
python /scripts/adlsgen2setup.py './data/*' --data-access-control './scripts/sampleacls.json' -v
python ./scripts/adlsgen2setup.py './data' --data-access-control './scripts/sampleacls.json' -v
```

The script performs the following steps:
Expand Down
16 changes: 8 additions & 8 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ param chatGptDeploymentCapacity int = 0
var chatGpt = {
modelName: !empty(chatGptModelName)
? chatGptModelName
: startsWith(openAiHost, 'azure') ? 'gpt-35-turbo' : 'gpt-3.5-turbo'
deploymentName: !empty(chatGptDeploymentName) ? chatGptDeploymentName : 'chat'
deploymentVersion: !empty(chatGptDeploymentVersion) ? chatGptDeploymentVersion : '0613'
deploymentSkuName: !empty(chatGptDeploymentSkuName) ? chatGptDeploymentSkuName : 'Standard'
: startsWith(openAiHost, 'azure') ? 'gpt-4o' : 'gpt-4o'
deploymentName: !empty(chatGptDeploymentName) ? chatGptDeploymentName : 'Truong_GPT4o'
deploymentVersion: !empty(chatGptDeploymentVersion) ? chatGptDeploymentVersion : '2024-05-13'
deploymentSkuName: !empty(chatGptDeploymentSkuName) ? chatGptDeploymentSkuName : 'GlobalStandard'
deploymentCapacity: chatGptDeploymentCapacity != 0 ? chatGptDeploymentCapacity : 30
}

Expand All @@ -131,11 +131,11 @@ param embeddingDeploymentSkuName string = ''
param embeddingDeploymentCapacity int = 0
param embeddingDimensions int = 0
var embedding = {
modelName: !empty(embeddingModelName) ? embeddingModelName : 'text-embedding-ada-002'
deploymentName: !empty(embeddingDeploymentName) ? embeddingDeploymentName : 'embedding'
deploymentVersion: !empty(embeddingDeploymentVersion) ? embeddingDeploymentVersion : '2'
modelName: !empty(embeddingModelName) ? embeddingModelName : 'text-embedding-3-large'
deploymentName: !empty(embeddingDeploymentName) ? embeddingDeploymentName : 'Truong_embedding'
deploymentVersion: !empty(embeddingDeploymentVersion) ? embeddingDeploymentVersion : '1'
deploymentSkuName: !empty(embeddingDeploymentSkuName) ? embeddingDeploymentSkuName : 'Standard'
deploymentCapacity: embeddingDeploymentCapacity != 0 ? embeddingDeploymentCapacity : 30
deploymentCapacity: embeddingDeploymentCapacity != 0 ? embeddingDeploymentCapacity : 120
dimensions: embeddingDimensions != 0 ? embeddingDimensions : 1536
}

Expand Down
4 changes: 2 additions & 2 deletions scripts/adlsgen2setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ async def create_or_get_group(self, group_name: str):
"securityEnabled": self.security_enabled_groups,
"groupTypes": ["Unified"],
# If Unified does not work for you, then you may need the following settings instead:
# "mailEnabled": False,
# "mailNickname": group_name,
"mailEnabled": False,
"mailNickname": group_name,
}
async with session.post("https://graph.microsoft.com/v1.0/groups", json=group) as response:
content = await response.json()
Expand Down
38 changes: 16 additions & 22 deletions scripts/sampleacls.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
{
"files": {
"Benefit_Options.pdf": {
"directory": "benefitinfo"
"2. BUV-OCT24-FREQUENTLY ASKED QUESTIONS.pdf": {
"directory": "studenhandbook"
},
"employee_handbook.pdf": {
"directory": "employeeinfo"
"3. SU-OCT24-FREQUENTLY ASKED QUESTIONS.pdf": {
"directory": "studenhandbook"
},
"Northwind_Health_Plus_Benefits_Details.pdf": {
"directory": "benefitinfo"
"7. PSG Programme Handbook_Oct 2024.pdf": {
"directory": "studenhandbook"
},
"Northwind_Standard_Benefits_Details.pdf": {
"directory": "benefitinfo"
},
"PerksPlus.pdf": {
"directory": "benefitinfo"
},
"role_library.pdf": {
"directory": "employeeinfo"
"8. Student Handbook 2024-2025 - Oct 2024.pdf": {
"directory": "studenhandbook"
}
},
"directories": {
"employeeinfo": {
"groups": ["GPTKB_HRTest"]
"teacher": {
"groups": ["BUV_TeacherTest"]
},
"benefitinfo": {
"groups": ["GPTKB_EmployeeTest", "GPTKB_HRTest"]
"studenhandbook": {
"groups": ["BUV_EmployeeTest", "BUV_TeacherTest"]
},
"/": {
"groups": ["GPTKB_AdminTest"]
"groups": ["BUV_AdminTest"]
}
},
"groups": [
"GPTKB_AdminTest",
"GPTKB_HRTest",
"GPTKB_EmployeeTest"
"BUV_AdminTest",
"BUV_TeacherTest",
"BUV_EmployeeTest"
]
}
Loading