Skip to content

Commit 03984e1

Browse files
fix: Kernel Function Method Renaming for Clarity and Bicep Standard Changes
2 parents 9a78401 + 47cbe72 commit 03984e1

31 files changed

+1648
-851
lines changed

.github/workflows/deploy-KMGeneric.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
az deployment group create \
121121
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
122122
--template-file infra/main.bicep \
123-
--parameters environmentName=${{env.SOLUTION_PREFIX}} contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" imageTag=${{ steps.determine_tag.outputs.tagname }} gptDeploymentCapacity=150 aiDeploymentsLocation="${{ env.AZURE_LOCATION }}"
123+
--parameters solutionName=${{env.SOLUTION_PREFIX}} contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" imageTag=${{ steps.determine_tag.outputs.tagname }} gptDeploymentCapacity=150 aiDeploymentsLocation="${{ env.AZURE_LOCATION }}"
124124
125125
126126

docs/workshop/docs/workshop/Challenge-5/python/content_understanding_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ def __init__(
3232
)
3333

3434
def _get_analyzer_url(self, endpoint, api_version, analyzer_id):
35-
return f"{endpoint}/contentunderstanding/analyzers/{analyzer_id}?api-version={api_version}" # noqa
35+
return f"{endpoint}/contentunderstanding/analyzers/{analyzer_id}?api-version={api_version}"
3636

3737
def _get_analyzer_list_url(self, endpoint, api_version):
3838
return f"{endpoint}/contentunderstanding/analyzers?api-version={api_version}"
3939

4040
def _get_analyze_url(self, endpoint, api_version, analyzer_id):
41-
return f"{endpoint}/contentunderstanding/analyzers/{analyzer_id}:analyze?api-version={api_version}" # noqa
41+
return f"{endpoint}/contentunderstanding/analyzers/{analyzer_id}:analyze?api-version={api_version}"
4242

4343
def _get_training_data_config(
4444
self, storage_container_sas_url, storage_container_path_prefix
@@ -143,7 +143,7 @@ def begin_create_analyzer(
143143
if (
144144
training_storage_container_sas_url
145145
and training_storage_container_path_prefix
146-
): # noqa
146+
):
147147
analyzer_template["trainingData"] = self._get_training_data_config(
148148
training_storage_container_sas_url,
149149
training_storage_container_path_prefix,

infra/create-sql-user-and-role.bicep

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
targetScope = 'resourceGroup'
22

3-
@description('The Azure region for the resource.')
3+
@description('Required. The Azure region for the resource.')
44
param location string
55

6-
@description('The tags to associate with this resource.')
6+
@description('Required. The tags to associate with this resource.')
77
param tags object = {}
88

9-
@description('The database roles to assign to the user.')
9+
@description('Required. The database roles to assign to the user.')
1010
param databaseRoles string[] = ['db_datareader']
1111

12-
@description('The name of the User Assigned Managed Identity to be used.')
12+
@description('Required. The name of the User Assigned Managed Identity to be used.')
1313
param managedIdentityName string
1414

15-
@description('The principal (or object) ID of the user to create.')
15+
@description('Required. The principal (or object) ID of the user to create.')
1616
param principalId string
1717

18-
@description('The name of the user to create.')
18+
@description('Required. The name of the user to create.')
1919
param principalName string
2020

21-
@description('The name of the SQL Database resource.')
21+
@description('Required. The name of the SQL Database resource.')
2222
param sqlDatabaseName string
2323

24-
@description('The name of the SQL Server resource.')
24+
@description('Required. The name of the SQL Server resource.')
2525
param sqlServerName string
2626

2727
@description('Do not set - unique script ID to force the script to run.')
@@ -44,7 +44,7 @@ resource createSqlUserAndRole 'Microsoft.Resources/deploymentScripts@2023-08-01'
4444
}
4545
properties: {
4646
forceUpdateTag: uniqueScriptId
47-
azPowerShellVersion: '7.2'
47+
azPowerShellVersion: '11.0'
4848
retentionInterval: 'PT1H'
4949
cleanupPreference: 'OnSuccess'
5050
arguments: join(

infra/deploy_ai_foundry.bicep

Lines changed: 95 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,63 @@
11
// Creates Azure dependent resources for Azure AI studio
2+
3+
@minLength(3)
4+
@maxLength(16)
5+
@description('Required. Contains Solution Name')
26
param solutionName string
7+
8+
@description('Required. Specifies the location for resources.')
39
param solutionLocation string
10+
11+
@description('Optional. Contains KeyVault Name')
412
param keyVaultName string=''
13+
14+
@description('Required. Contains CU Location')
515
param cuLocation string
16+
17+
@description('Required. Contains type of Deployment')
618
param deploymentType string
19+
20+
@description('Required. Contains GPT mode Name')
721
param gptModelName string
22+
23+
@description('Required. Contains GPT Model Version')
824
param gptModelVersion string
25+
26+
@description('Required. Contains Open AI API version')
927
param azureOpenAIApiVersion string
28+
29+
@description('Required. Contains GPT Deployment Capacity')
1030
param gptDeploymentCapacity int
31+
32+
@description('Required. Contains Embedding Model')
1133
param embeddingModel string
34+
35+
@description('Required. Contains Embedding Deployment Capacity')
1236
param embeddingDeploymentCapacity int
37+
38+
@description('Optional. Contains Managed Identity ObjectID')
1339
param managedIdentityObjectId string=''
40+
41+
@description('Optional. Contains existing Log Analytics Workspace ID')
1442
param existingLogAnalyticsWorkspaceId string = ''
43+
44+
@description('Optional. Contains existing AI Project Resource ID')
1545
param azureExistingAIProjectResourceId string = ''
1646

17-
var abbrs = loadJsonContent('./abbreviations.json')
18-
var aiServicesName = '${abbrs.ai.aiServices}${solutionName}'
19-
var aiServicesName_cu = '${abbrs.ai.aiServices}${solutionName}-cu'
47+
@description('Optional. Tags to be applied to the resources.')
48+
param tags object = {}
49+
50+
//var abbrs = loadJsonContent('./abbreviations.json')
51+
var aiServicesName = 'aisa-${solutionName}'
52+
var aiServicesName_cu = 'aisa-${solutionName}-cu'
2053
var location_cu = cuLocation
21-
var workspaceName = '${abbrs.managementGovernance.logAnalyticsWorkspace}${solutionName}'
22-
var applicationInsightsName = '${abbrs.managementGovernance.applicationInsights}${solutionName}'
23-
var keyvaultName = '${abbrs.security.keyVault}${solutionName}'
54+
var workspaceName = 'log-${solutionName}'
55+
var applicationInsightsName = 'appi-${solutionName}'
56+
var keyvaultName = 'kv-${solutionName}'
2457
var location = solutionLocation //'eastus2'
25-
var aiProjectName = '${abbrs.ai.aiFoundryProject}${solutionName}'
26-
var aiSearchName = '${abbrs.ai.aiSearch}${solutionName}'
27-
var aiSearchConnectionName = 'myVectorStoreProjectConnectionName-${solutionName}'
58+
var aiProjectName = 'proj-${solutionName}'
59+
var aiSearchName = 'srch-${solutionName}'
60+
var aiSearchConnectionName = 'myCon-${solutionName}'
2861

2962
var aiModelDeployments = [
3063
{
@@ -72,7 +105,7 @@ resource existingLogAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces
72105
resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2023-09-01' = if (!useExisting){
73106
name: workspaceName
74107
location: location
75-
tags: {}
108+
tags: tags
76109
properties: {
77110
retentionInDays: 30
78111
sku: {
@@ -91,6 +124,7 @@ resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
91124
publicNetworkAccessForQuery: 'Disabled'
92125
WorkspaceResourceId: useExisting ? existingLogAnalyticsWorkspace.id : logAnalytics.id
93126
}
127+
tags : tags
94128
}
95129

96130
resource aiServices 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' = if (empty(azureExistingAIProjectResourceId)) {
@@ -114,6 +148,7 @@ resource aiServices 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' =
114148
publicNetworkAccess: 'Enabled'
115149
disableLocalAuth: false //needs to be false to access keys
116150
}
151+
tags : tags
117152
}
118153

119154
module existing_aiServicesModule 'existing_foundry_project.bicep' = if (!empty(azureExistingAIProjectResourceId)) {
@@ -146,6 +181,7 @@ resource aiServices_CU 'Microsoft.CognitiveServices/accounts@2025-04-01-preview'
146181
publicNetworkAccess: 'Enabled'
147182
disableLocalAuth: false //needs to be false to access keys
148183
}
184+
tags : tags
149185
}
150186

151187
@batchSize(1)
@@ -163,6 +199,7 @@ resource aiServicesDeployments 'Microsoft.CognitiveServices/accounts/deployments
163199
name: aiModeldeployment.sku.name
164200
capacity: aiModeldeployment.sku.capacity
165201
}
202+
tags : tags
166203
}]
167204

168205
resource aiSearch 'Microsoft.Search/searchServices@2024-06-01-preview' = {
@@ -188,6 +225,7 @@ resource aiSearch 'Microsoft.Search/searchServices@2024-06-01-preview' = {
188225
disableLocalAuth: true
189226
semanticSearch: 'free'
190227
}
228+
tags : tags
191229
}
192230

193231
resource aiProject 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-preview' = if (empty(azureExistingAIProjectResourceId)) {
@@ -199,6 +237,7 @@ resource aiProject 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-pre
199237
type: 'SystemAssigned'
200238
}
201239
properties: {}
240+
tags : tags
202241
}
203242

204243
resource aiproject_aisearch_connection_new 'Microsoft.CognitiveServices/accounts/projects/connections@2025-04-01-preview' = if (empty(azureExistingAIProjectResourceId)) {
@@ -371,6 +410,7 @@ resource tenantIdEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' =
371410
properties: {
372411
value: subscription().tenantId
373412
}
413+
tags : tags
374414
}
375415

376416
resource azureOpenAIInferenceEndpoint 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -379,6 +419,7 @@ resource azureOpenAIInferenceEndpoint 'Microsoft.KeyVault/vaults/secrets@2021-11
379419
properties: {
380420
value:''
381421
}
422+
tags : tags
382423
}
383424

384425
resource azureOpenAIInferenceKey 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -387,6 +428,7 @@ resource azureOpenAIInferenceKey 'Microsoft.KeyVault/vaults/secrets@2021-11-01-p
387428
properties: {
388429
value:''
389430
}
431+
tags : tags
390432
}
391433

392434
resource azureOpenAIDeploymentModel 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -395,6 +437,7 @@ resource azureOpenAIDeploymentModel 'Microsoft.KeyVault/vaults/secrets@2021-11-0
395437
properties: {
396438
value: gptModelName
397439
}
440+
tags : tags
398441
}
399442

400443
resource azureOpenAIApiVersionEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -403,6 +446,7 @@ resource azureOpenAIApiVersionEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-0
403446
properties: {
404447
value: azureOpenAIApiVersion //'2024-02-15-preview'
405448
}
449+
tags : tags
406450
}
407451

408452
resource azureOpenAIEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -411,6 +455,7 @@ resource azureOpenAIEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-
411455
properties: {
412456
value: !empty(existingOpenAIEndpoint) ? existingOpenAIEndpoint : aiServices.properties.endpoints['OpenAI Language Model Instance API'] //aiServices_m.properties.endpoint
413457
}
458+
tags : tags
414459
}
415460

416461
resource azureOpenAIEmbeddingDeploymentModel 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -419,6 +464,7 @@ resource azureOpenAIEmbeddingDeploymentModel 'Microsoft.KeyVault/vaults/secrets@
419464
properties: {
420465
value: embeddingModel
421466
}
467+
tags : tags
422468
}
423469

424470
resource azureOpenAICUEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -427,6 +473,7 @@ resource azureOpenAICUEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-0
427473
properties: {
428474
value: aiServices_CU.properties.endpoints['OpenAI Language Model Instance API']
429475
}
476+
tags : tags
430477
}
431478

432479
resource azureOpenAICUApiVersionEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -435,6 +482,7 @@ resource azureOpenAICUApiVersionEntry 'Microsoft.KeyVault/vaults/secrets@2021-11
435482
properties: {
436483
value: '?api-version=2024-12-01-preview'
437484
}
485+
tags : tags
438486
}
439487

440488
resource azureSearchServiceEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -443,6 +491,7 @@ resource azureSearchServiceEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021
443491
properties: {
444492
value: 'https://${aiSearch.name}.search.windows.net'
445493
}
494+
tags : tags
446495
}
447496

448497
resource azureSearchServiceEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -451,6 +500,7 @@ resource azureSearchServiceEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-p
451500
properties: {
452501
value: aiSearch.name
453502
}
503+
tags : tags
454504
}
455505

456506
resource azureSearchIndexEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -459,6 +509,7 @@ resource azureSearchIndexEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-pre
459509
properties: {
460510
value: 'transcripts_index'
461511
}
512+
tags : tags
462513
}
463514

464515
resource cogServiceEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -467,6 +518,7 @@ resource cogServiceEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-p
467518
properties: {
468519
value: !empty(existingOpenAIEndpoint) ? existingOpenAIEndpoint : aiServices.properties.endpoints['OpenAI Language Model Instance API']
469520
}
521+
tags : tags
470522
}
471523

472524
resource cogServiceNameEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -475,6 +527,7 @@ resource cogServiceNameEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-previ
475527
properties: {
476528
value: aiServicesName
477529
}
530+
tags : tags
478531
}
479532

480533
resource azureSubscriptionIdEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -483,6 +536,7 @@ resource azureSubscriptionIdEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-
483536
properties: {
484537
value: subscription().subscriptionId
485538
}
539+
tags : tags
486540
}
487541

488542
resource resourceGroupNameEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -491,6 +545,7 @@ resource resourceGroupNameEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-pr
491545
properties: {
492546
value: resourceGroup().name
493547
}
548+
tags : tags
494549
}
495550

496551
resource azureLocatioEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
@@ -499,23 +554,53 @@ resource azureLocatioEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview
499554
properties: {
500555
value: solutionLocation
501556
}
557+
tags : tags
502558
}
559+
560+
@description('Contains KeyVault Name')
503561
output keyvaultName string = keyvaultName
562+
563+
@description('Contains KeyVault ID')
504564
output keyvaultId string = keyVault.id
565+
566+
@description('Contains AI Services Target')
505567
output aiServicesTarget string = !empty(existingOpenAIEndpoint) ? existingOpenAIEndpoint : aiServices.properties.endpoints['OpenAI Language Model Instance API'] //aiServices_m.properties.endpoint
568+
569+
@description('Contains AI Services Name')
506570
output aiServicesName string = !empty(existingAIServicesName) ? existingAIServicesName : aiServicesName
507571

572+
@description('Contains Search Name')
508573
output aiSearchName string = aiSearchName
574+
575+
@description('Contains Search ID')
509576
output aiSearchId string = aiSearch.id
577+
578+
@description('Contains AI Search Target')
510579
output aiSearchTarget string = 'https://${aiSearch.name}.search.windows.net'
580+
581+
@description('Contains AI Search Service Name')
511582
output aiSearchService string = aiSearch.name
583+
584+
@description('Contains AI Project Name')
512585
output aiProjectName string = !empty(existingAIProjectName) ? existingAIProjectName : aiProject.name
586+
587+
@description('Contains AI Search Connection Name')
513588
output aiSearchConnectionName string = aiSearchConnectionName
514589

590+
@description('Contains Application Insights ID')
515591
output applicationInsightsId string = applicationInsights.id
592+
593+
@description('Contains LogAnalytics Workspace Resource Name')
516594
output logAnalyticsWorkspaceResourceName string = useExisting ? existingLogAnalyticsWorkspace.name : logAnalytics.name
595+
596+
@description('Contains LogAnalytics Workspace Resource Group')
517597
output logAnalyticsWorkspaceResourceGroup string = useExisting ? existingLawResourceGroup : resourceGroup().name
598+
599+
@description('Contains LogAnalytics Workspace Subscription')
518600
output logAnalyticsWorkspaceSubscription string = useExisting ? existingLawSubscription : subscription().subscriptionId
519601

602+
@description('Contains Project Endpoint')
520603
output projectEndpoint string = !empty(existingProjEndpoint) ? existingProjEndpoint : aiProject.properties.endpoints['AI Foundry API']
604+
605+
@description('Contains Application Insights Connection String')
521606
output applicationInsightsConnectionString string = applicationInsights.properties.ConnectionString

0 commit comments

Comments
 (0)