@@ -11,12 +11,10 @@ $storageAccount = ""
1111$blobContainerForRetailCustomer = " "
1212$blobContainerForRetailOrder = " "
1313$blobContainerForRFP = " "
14- $blobContainerForLegalContract = " "
1514$aiSearch = " "
1615$aiSearchIndexForRetailCustomer = " "
1716$aiSearchIndexForRetailOrder = " "
1817$aiSearchIndexForRFP = " "
19- $aiSearchIndexForLegalContract = " "
2018$azSubscriptionId = " "
2119
2220function Test-AzdInstalled {
@@ -42,12 +40,10 @@ function Get-ValuesFromAzdEnv {
4240 $script :blobContainerForRetailCustomer = $ (azd env get-value AZURE_STORAGE_CONTAINER_NAME_RETAIL_CUSTOMER)
4341 $script :blobContainerForRetailOrder = $ (azd env get-value AZURE_STORAGE_CONTAINER_NAME_RETAIL_ORDER)
4442 $script :blobContainerForRFP = $ (azd env get-value AZURE_STORAGE_CONTAINER_NAME_RFP)
45- $script :blobContainerForLegalContract = $ (azd env get-value AZURE_STORAGE_CONTAINER_NAME_LEGAL_CONTRACT)
4643 $script :aiSearch = $ (azd env get-value AZURE_AI_SEARCH_NAME)
4744 $script :aiSearchIndexForRetailCustomer = $ (azd env get-value AZURE_AI_SEARCH_INDEX_NAME_RETAIL_CUSTOMER)
4845 $script :aiSearchIndexForRetailOrder = $ (azd env get-value AZURE_AI_SEARCH_INDEX_NAME_RETAIL_ORDER)
4946 $script :aiSearchIndexForRFP = $ (azd env get-value AZURE_AI_SEARCH_INDEX_NAME_RFP)
50- $script :aiSearchIndexForLegalContract = $ (azd env get-value AZURE_AI_SEARCH_INDEX_NAME_LEGAL_CONTRACT)
5147 $script :ResourceGroup = $ (azd env get-value AZURE_RESOURCE_GROUP)
5248
5349 # Validate that we got all required values
@@ -85,11 +81,9 @@ function Get-ValuesFromAzDeployment {
8581 $script :blobContainerForRetailCustomer = $deploymentOutputs.azurE_STORAGE_CONTAINER_NAME_RETAIL_CUSTOMER.value
8682 $script :blobContainerForRetailOrder = $deploymentOutputs.azurE_STORAGE_CONTAINER_NAME_RETAIL_ORDER.value
8783 $script :blobContainerForRFP = $deploymentOutputs.azurE_STORAGE_CONTAINER_NAME_RFP.value
88- $script :blobContainerForLegalContract = $deploymentOutputs.azurE_STORAGE_CONTAINER_NAME_LEGAL_CONTRACT.value
8984 $script :aiSearchIndexForRetailCustomer = $deploymentOutputs.azurE_AI_SEARCH_INDEX_NAME_RETAIL_CUSTOMER.value
9085 $script :aiSearchIndexForRetailOrder = $deploymentOutputs.azurE_AI_SEARCH_INDEX_NAME_RETAIL_ORDER.value
9186 $script :aiSearchIndexForRFP = $deploymentOutputs.azurE_AI_SEARCH_INDEX_NAME_RFP.value
92- $script :aiSearchIndexForLegalContract = $deploymentOutputs.azurE_AI_SEARCH_INDEX_NAME_LEGAL_CONTRACT.value
9387 $script :aiSearch = $deploymentOutputs.azurE_AI_SEARCH_NAME.value
9488 $script :backendUrl = $deploymentOutputs.backenD_URL.value
9589
@@ -206,8 +200,7 @@ Write-Host "1. RFP Evaluation"
206200Write-Host " 2. Retail Customer Satisfaction"
207201Write-Host " 3. HR Employee Onboarding"
208202Write-Host " 4. Marketing Press Release"
209- Write-Host " 5. Legal Contract Review"
210- Write-Host " 6. All"
203+ Write-Host " 5. All"
211204Write-Host " ==============================================="
212205Write-Host " "
213206
216209 $useCaseSelection = Read-Host " Please enter the number of the use case you would like to install."
217210
218211 # Handle both numeric and text input for 'all'
219- if ($useCaseSelection -eq " all" -or $useCaseSelection -eq " 6 " ) {
212+ if ($useCaseSelection -eq " all" -or $useCaseSelection -eq " 5 " ) {
220213 $selectedUseCase = " All"
221214 $useCaseValid = $true
222215 Write-Host " Selected: All use cases will be installed."
@@ -245,15 +238,9 @@ do {
245238 Write-Host " Selected: Marketing Press Release"
246239 Write-Host " Note: If you choose to install a single use case, installation of other use cases will require re-running this script."
247240 }
248- elseif ($useCaseSelection -eq " 5" ) {
249- $selectedUseCase = " Legal Contract Review"
250- $useCaseValid = $true
251- Write-Host " Selected: Legal Contract Review"
252- Write-Host " Note: If you choose to install a single use case, installation of other use cases will require re-running this script."
253- }
254241 else {
255242 $useCaseValid = $false
256- Write-Host " Invalid selection. Please enter a number from 1-6 ." - ForegroundColor Red
243+ Write-Host " Invalid selection. Please enter a number from 1-5 ." - ForegroundColor Red
257244 }
258245} while (-not $useCaseValid )
259246
@@ -338,7 +325,7 @@ $isSampleDataFailed = $false
338325$failedTeamConfigs = 0
339326
340327# Use Case 3 -----=--
341- if ($useCaseSelection -eq " 3" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 6 " ) {
328+ if ($useCaseSelection -eq " 3" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 5 " ) {
342329 Write-Host " Uploading Team Configuration for HR Employee Onboarding..."
343330 $directoryPath = " data/agent_teams"
344331 $teamId = " 00000000-0000-0000-0000-000000000001"
@@ -357,7 +344,7 @@ if($useCaseSelection -eq "3" -or $useCaseSelection -eq "all" -or $useCaseSelecti
357344}
358345
359346# Use Case 4 -----=--
360- if ($useCaseSelection -eq " 4" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 6 " ) {
347+ if ($useCaseSelection -eq " 4" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 5 " ) {
361348 Write-Host " Uploading Team Configuration for Marketing Press Release..."
362349 $directoryPath = " data/agent_teams"
363350 $teamId = " 00000000-0000-0000-0000-000000000002"
@@ -378,7 +365,7 @@ if($useCaseSelection -eq "4" -or $useCaseSelection -eq "all" -or $useCaseSelecti
378365$stIsPublicAccessDisabled = $false
379366$srchIsPublicAccessDisabled = $false
380367# Enable public access for resources
381- if ($useCaseSelection -eq " 1" -or $useCaseSelection -eq " 2" -or $useCaseSelection -eq " 5 " -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 6 " ){
368+ if ($useCaseSelection -eq " 1" -or $useCaseSelection -eq " 2" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 5 " ){
382369 if ($ResourceGroup ) {
383370 $stPublicAccess = $ (az storage account show -- name $storageAccount -- resource- group $ResourceGroup -- query " publicNetworkAccess" - o tsv)
384371 if ($stPublicAccess -eq " Disabled" ) {
@@ -412,7 +399,7 @@ if($useCaseSelection -eq "1"-or $useCaseSelection -eq "2" -or $useCaseSelection
412399
413400
414401
415- if ($useCaseSelection -eq " 1" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 6 " ) {
402+ if ($useCaseSelection -eq " 1" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 5 " ) {
416403 Write-Host " Uploading Team Configuration for RFP Evaluation..."
417404 $directoryPath = " data/agent_teams"
418405 $teamId = " 00000000-0000-0000-0000-000000000004"
@@ -452,48 +439,7 @@ if($useCaseSelection -eq "1" -or $useCaseSelection -eq "all" -or $useCaseSelecti
452439 Write-Host " Python script to index data for RFP Evaluation successfully executed."
453440}
454441
455-
456- if ($useCaseSelection -eq " 5" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 6" ) {
457- Write-Host " Uploading Team Configuration for Legal Contract..."
458- $directoryPath = " data/agent_teams"
459- $teamId = " 00000000-0000-0000-0000-000000000005"
460- try {
461- $process = Start-Process - FilePath $pythonCmd - ArgumentList " infra/scripts/upload_team_config.py" , $backendUrl , $directoryPath , $userPrincipalId , $teamId - Wait - NoNewWindow - PassThru
462- if ($process.ExitCode -ne 0 ) {
463- Write-Host " Error: Team configuration for Legal Contract upload failed."
464- $failedTeamConfigs += 1
465- $isTeamConfigFailed = $true
466- }
467- } catch {
468- Write-Host " Error: Uploading team configuration failed."
469- $isTeamConfigFailed = $true
470- }
471- Write-Host " Uploaded Team Configuration for Legal Contract..."
472-
473- $directoryPath = " data/datasets/legal_contract"
474- # Upload sample files to blob storage
475- Write-Host " Uploading sample files to blob storage for Legal Contract..."
476- $result = az storage blob upload- batch -- account- name $storageAccount -- destination $blobContainerForLegalContract -- source $directoryPath -- auth- mode login -- pattern " *" -- overwrite -- output none
477-
478- if ($LASTEXITCODE -ne 0 ) {
479- Write-Host " Error: Failed to upload files to blob storage."
480- $isSampleDataFailed = $true
481- exit 1
482- }
483- Write-Host " Files uploaded successfully to blob storage."
484-
485- # Run the Python script to index data
486- Write-Host " Running the python script to index data for Legal Contract"
487- $process = Start-Process - FilePath $pythonCmd - ArgumentList " infra/scripts/index_datasets.py" , $storageAccount , $blobContainerForLegalContract , $aiSearch , $aiSearchIndexForLegalContract - Wait - NoNewWindow - PassThru
488-
489- if ($process.ExitCode -ne 0 ) {
490- Write-Host " Error: Indexing python script execution failed."
491- $isSampleDataFailed = $true
492- }
493- Write-Host " Python script to index data for Legal Contract successfully executed."
494- }
495-
496- if ($useCaseSelection -eq " 2" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 6" ) {
442+ if ($useCaseSelection -eq " 2" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 5" ) {
497443 Write-Host " Uploading Team Configuration for Retail Customer Satisfaction..."
498444 $directoryPath = " data/agent_teams"
499445 $teamId = " 00000000-0000-0000-0000-000000000003"
@@ -576,7 +522,7 @@ if ($isTeamConfigFailed -or $isSampleDataFailed) {
576522 Write-Host " `n One or more tasks failed. Please check the error messages above."
577523 exit 1
578524} else {
579- if ($useCaseSelection -eq " 1" -or $useCaseSelection -eq " 2" -or $useCaseSelection -eq " 5 " -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 6 " ){
525+ if ($useCaseSelection -eq " 1" -or $useCaseSelection -eq " 2" -or $useCaseSelection -eq " all" -or $useCaseSelection -eq " 5 " ){
580526 Write-Host " `n Team configuration upload and sample data processing completed successfully."
581527 }else {
582528 Write-Host " `n Team configuration upload completed successfully."
0 commit comments