|
361 | 361 | "metadata": { |
362 | 362 | "_generator": { |
363 | 363 | "name": "bicep", |
364 | | - "version": "0.35.1.17967", |
365 | | - "templateHash": "14416829741819681429" |
| 364 | + "version": "0.34.44.8038", |
| 365 | + "templateHash": "17718433303911294858" |
366 | 366 | } |
367 | 367 | }, |
368 | 368 | "parameters": { |
|
456 | 456 | "metadata": { |
457 | 457 | "_generator": { |
458 | 458 | "name": "bicep", |
459 | | - "version": "0.35.1.17967", |
460 | | - "templateHash": "14711167186840027914" |
| 459 | + "version": "0.34.44.8038", |
| 460 | + "templateHash": "10936025922757970234" |
461 | 461 | } |
462 | 462 | }, |
463 | 463 | "parameters": { |
|
888 | 888 | "aiSearchName": "[format('{0}{1}', variables('abbrs').ai.aiSearch, parameters('solutionName'))]", |
889 | 889 | "workspaceName": "[format('{0}{1}', variables('abbrs').managementGovernance.logAnalyticsWorkspace, parameters('solutionName'))]", |
890 | 890 | "useExisting": "[not(empty(parameters('existingLogAnalyticsWorkspaceId')))]", |
| 891 | + "existingLawSubscription": "[if(variables('useExisting'), split(parameters('existingLogAnalyticsWorkspaceId'), '/')[2], '')]", |
891 | 892 | "existingLawResourceGroup": "[if(variables('useExisting'), split(parameters('existingLogAnalyticsWorkspaceId'), '/')[4], '')]", |
892 | 893 | "existingLawName": "[if(variables('useExisting'), split(parameters('existingLogAnalyticsWorkspaceId'), '/')[8], '')]", |
893 | 894 | "aiModelDeployments": [ |
|
989 | 990 | "Application_Type": "web", |
990 | 991 | "publicNetworkAccessForIngestion": "Enabled", |
991 | 992 | "publicNetworkAccessForQuery": "Enabled", |
992 | | - "WorkspaceResourceId": "[if(variables('useExisting'), extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('existingLawResourceGroup')), 'Microsoft.OperationalInsights/workspaces', variables('existingLawName')), resourceId('Microsoft.OperationalInsights/workspaces', variables('workspaceName')))]" |
| 993 | + "WorkspaceResourceId": "[if(variables('useExisting'), extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', variables('existingLawSubscription'), variables('existingLawResourceGroup')), 'Microsoft.OperationalInsights/workspaces', variables('existingLawName')), resourceId('Microsoft.OperationalInsights/workspaces', variables('workspaceName')))]" |
993 | 994 | }, |
994 | 995 | "dependsOn": [ |
995 | 996 | "[resourceId('Microsoft.OperationalInsights/workspaces', variables('workspaceName'))]" |
|
1406 | 1407 | "applicationInsightsConnectionString": { |
1407 | 1408 | "type": "string", |
1408 | 1409 | "value": "[reference(resourceId('Microsoft.Insights/components', variables('applicationInsightsName')), '2020-02-02').ConnectionString]" |
| 1410 | + }, |
| 1411 | + "azureProjectConnString": { |
| 1412 | + "type": "string", |
| 1413 | + "value": "[format('{0};{1};{2};{3}', split(reference(resourceId('Microsoft.MachineLearningServices/workspaces', variables('aiProjectName')), '2024-01-01-preview').discoveryUrl, '/')[2], subscription().subscriptionId, resourceGroup().name, variables('aiProjectName'))]" |
1409 | 1414 | } |
1410 | 1415 | } |
1411 | 1416 | } |
|
1448 | 1453 | "metadata": { |
1449 | 1454 | "_generator": { |
1450 | 1455 | "name": "bicep", |
1451 | | - "version": "0.35.1.17967", |
1452 | | - "templateHash": "12684246002053954621" |
| 1456 | + "version": "0.34.44.8038", |
| 1457 | + "templateHash": "14155463992250872710" |
1453 | 1458 | } |
1454 | 1459 | }, |
1455 | 1460 | "parameters": { |
|
1657 | 1662 | "AZURE_OPENAI_RESOURCE": { |
1658 | 1663 | "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.aiServicesName.value]" |
1659 | 1664 | }, |
| 1665 | + "AzureOpenAIProjectConnString": { |
| 1666 | + "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.azureProjectConnString.value]" |
| 1667 | + }, |
| 1668 | + "AzureAIProjectName": { |
| 1669 | + "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.aiProjectName.value]" |
| 1670 | + }, |
1660 | 1671 | "USE_CHAT_HISTORY_ENABLED": { |
1661 | 1672 | "value": "True" |
1662 | 1673 | }, |
|
1680 | 1691 | }, |
1681 | 1692 | "WebsiteName": { |
1682 | 1693 | "value": "[format('{0}{1}', variables('abbrs').compute.webApp, variables('solutionPrefix'))]" |
| 1694 | + }, |
| 1695 | + "useAiFoundrySdk": { |
| 1696 | + "value": "False" |
1683 | 1697 | } |
1684 | 1698 | }, |
1685 | 1699 | "template": { |
|
1688 | 1702 | "metadata": { |
1689 | 1703 | "_generator": { |
1690 | 1704 | "name": "bicep", |
1691 | | - "version": "0.35.1.17967", |
1692 | | - "templateHash": "16988932665267526316" |
| 1705 | + "version": "0.34.44.8038", |
| 1706 | + "templateHash": "11947266873515406477" |
1693 | 1707 | } |
1694 | 1708 | }, |
1695 | 1709 | "parameters": { |
|
1760 | 1774 | "description": "Azure OpenAI Key" |
1761 | 1775 | } |
1762 | 1776 | }, |
| 1777 | + "AzureOpenAIProjectConnString": { |
| 1778 | + "type": "string", |
| 1779 | + "metadata": { |
| 1780 | + "description": "Azure Open AI Project Connection String" |
| 1781 | + } |
| 1782 | + }, |
| 1783 | + "AzureAIProjectName": { |
| 1784 | + "type": "string", |
| 1785 | + "metadata": { |
| 1786 | + "description": "Azure AI project name" |
| 1787 | + } |
| 1788 | + }, |
1763 | 1789 | "azureOpenAIApiVersion": { |
1764 | 1790 | "type": "string" |
1765 | 1791 | }, |
|
1907 | 1933 | "description": "Enable feedback in Cosmos DB" |
1908 | 1934 | } |
1909 | 1935 | }, |
| 1936 | + "useAiFoundrySdk": { |
| 1937 | + "type": "string", |
| 1938 | + "defaultValue": "False", |
| 1939 | + "metadata": { |
| 1940 | + "description": "Use AI Foundry SDK" |
| 1941 | + } |
| 1942 | + }, |
1910 | 1943 | "imageTag": { |
1911 | 1944 | "type": "string" |
1912 | 1945 | }, |
|
2090 | 2123 | "name": "AZURE_OPENAI_SYSTEM_MESSAGE", |
2091 | 2124 | "value": "[variables('azureOpenAISystemMessage')]" |
2092 | 2125 | }, |
| 2126 | + { |
| 2127 | + "name": "AZURE_OPENAI_PROJECT_CONN_STRING", |
| 2128 | + "value": "[parameters('AzureOpenAIProjectConnString')]" |
| 2129 | + }, |
2093 | 2130 | { |
2094 | 2131 | "name": "USE_CHAT_HISTORY_ENABLED", |
2095 | 2132 | "value": "[parameters('USE_CHAT_HISTORY_ENABLED')]" |
|
2125 | 2162 | { |
2126 | 2163 | "name": "UWSGI_THREADS", |
2127 | 2164 | "value": "2" |
| 2165 | + }, |
| 2166 | + { |
| 2167 | + "name": "USE_AI_FOUNDRY_SDK", |
| 2168 | + "value": "[parameters('useAiFoundrySdk')]" |
2128 | 2169 | } |
2129 | 2170 | ], |
2130 | 2171 | "linuxFxVersion": "[variables('imageName')]" |
|
2146 | 2187 | "dependsOn": [ |
2147 | 2188 | "[resourceId('Microsoft.Web/sites', parameters('WebsiteName'))]" |
2148 | 2189 | ] |
| 2190 | + }, |
| 2191 | + { |
| 2192 | + "type": "Microsoft.Authorization/roleAssignments", |
| 2193 | + "apiVersion": "2022-04-01", |
| 2194 | + "scope": "[format('Microsoft.MachineLearningServices/workspaces/{0}', parameters('AzureAIProjectName'))]", |
| 2195 | + "name": "[guid(parameters('WebsiteName'), resourceId('Microsoft.MachineLearningServices/workspaces', parameters('AzureAIProjectName')), resourceId('Microsoft.Authorization/roleDefinitions', '64702f94-c441-49e6-a78b-ef80e0188fee'))]", |
| 2196 | + "properties": { |
| 2197 | + "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '64702f94-c441-49e6-a78b-ef80e0188fee')]", |
| 2198 | + "principalId": "[reference(resourceId('Microsoft.Web/sites', parameters('WebsiteName')), '2020-06-01', 'full').identity.principalId]" |
| 2199 | + }, |
| 2200 | + "dependsOn": [ |
| 2201 | + "[resourceId('Microsoft.Web/sites', parameters('WebsiteName'))]" |
| 2202 | + ] |
2149 | 2203 | } |
2150 | 2204 | ], |
2151 | 2205 | "outputs": { |
|
2191 | 2245 | "metadata": { |
2192 | 2246 | "_generator": { |
2193 | 2247 | "name": "bicep", |
2194 | | - "version": "0.35.1.17967", |
2195 | | - "templateHash": "12799194170352887919" |
| 2248 | + "version": "0.34.44.8038", |
| 2249 | + "templateHash": "9693594232553540170" |
2196 | 2250 | } |
2197 | 2251 | }, |
2198 | 2252 | "parameters": { |
|
0 commit comments