From 184e63d2ac2c99066a8e8387985f4edea3fef44e Mon Sep 17 00:00:00 2001 From: Pavan-Microsoft Date: Tue, 15 Apr 2025 17:44:51 +0530 Subject: [PATCH 1/2] truncate sql message --- infra/deploy_backend_docker.bicep | 31 +++++++----------------- infra/main.bicep | 8 +++--- src/api/ApiApp.Dockerfile | 19 +++++++++------ src/api/common/config/config.py | 22 +++-------------- src/api/plugins/chat_with_data_plugin.py | 1 + src/api/services/chat_service.py | 5 +--- 6 files changed, 28 insertions(+), 58 deletions(-) diff --git a/infra/deploy_backend_docker.bicep b/infra/deploy_backend_docker.bicep index d5a99bf75..b673eb199 100644 --- a/infra/deploy_backend_docker.bicep +++ b/infra/deploy_backend_docker.bicep @@ -4,8 +4,13 @@ param solutionName string @secure() param appSettings object = {} param appServicePlanId string +@secure() + param azureOpenAIKey string + @secure() + param azureAiProjectConnString string + @secure() + param azureSearchAdminKey string param userassignedIdentityId string -param keyVaultName string var imageName = 'DOCKER|kmcontainerreg.azurecr.io/km-api:${imageTag}' var name = '${solutionName}-api' @@ -84,6 +89,9 @@ module appService 'deploy_app_service.bicep' = { appSettings: union( appSettings, { + AZURE_OPENAI_API_KEY: azureOpenAIKey + AZURE_AI_SEARCH_API_KEY: azureSearchAdminKey + AZURE_AI_PROJECT_CONN_STRING:azureAiProjectConnString APPINSIGHTS_INSTRUMENTATIONKEY: reference(applicationInsightsId, '2015-05-01').InstrumentationKey REACT_APP_LAYOUT_CONFIG: reactAppLayoutConfig } @@ -110,25 +118,4 @@ resource role 'Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments@2022-05- } } -resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = { - name: keyVaultName -} - -var keyVaultSecretsOfficerId='b86a8fe4-44ce-4948-aee5-eccb2c155cd7' -@description('The built-in role for Key Vault Secrets Officer.') -resource keyVaultSecretsOfficerRoleDefinition 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = { - scope: subscription() - name: keyVaultSecretsOfficerId -} - -resource keyVaultSecretsOfficerRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - scope: keyVault - name: guid(keyVault.id, keyVaultSecretsOfficerRoleDefinition.id) - properties: { - roleDefinitionId: keyVaultSecretsOfficerRoleDefinition.id - principalId: appService.outputs.identityPrincipalId - principalType: 'ServicePrincipal' - } -} - output appUrl string = appService.outputs.appUrl diff --git a/infra/main.bicep b/infra/main.bicep index ef750c4b4..98e0155b6 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -194,16 +194,16 @@ module backend_docker 'deploy_backend_docker.bicep'= { imageTag: imageTag appServicePlanId: hostingplan.outputs.name applicationInsightsId: aifoundry.outputs.applicationInsightsId + azureOpenAIKey:keyVault.getSecret('AZURE-OPENAI-KEY') + azureAiProjectConnString:keyVault.getSecret('AZURE-AI-PROJECT-CONN-STRING') + azureSearchAdminKey:keyVault.getSecret('AZURE-SEARCH-KEY') solutionName: solutionPrefix userassignedIdentityId: managedIdentityModule.outputs.managedIdentityBackendAppOutput.id - keyVaultName:aifoundry.outputs.keyvaultName appSettings:{ AZURE_OPEN_AI_DEPLOYMENT_MODEL:gptModelName AZURE_OPEN_AI_ENDPOINT:aifoundry.outputs.aiServicesTarget AZURE_OPENAI_API_VERSION: azureOpenAIApiVersion AZURE_OPENAI_RESOURCE:aifoundry.outputs.aiServicesName - AZURE_OPENAI_API_KEY:'AZURE-OPENAI-KEY' - AZURE_KEY_VAULT_URL: kvault.outputs.keyvaultUri USE_CHAT_HISTORY_ENABLED:'True' AZURE_COSMOSDB_ACCOUNT: cosmosDBModule.outputs.cosmosAccountName AZURE_COSMOSDB_CONVERSATIONS_CONTAINER: cosmosDBModule.outputs.cosmosContainerName @@ -217,9 +217,7 @@ module backend_docker 'deploy_backend_docker.bicep'= { OPENAI_API_VERSION: azureOpenAIApiVersion AZURE_AI_SEARCH_ENDPOINT: aifoundry.outputs.aiSearchTarget AZURE_AI_SEARCH_INDEX: 'call_transcripts_index' - AZURE_AI_SEARCH_API_KEY:'AZURE-SEARCH-KEY' USE_AI_PROJECT_CLIENT:'False' - AZURE_AI_PROJECT_CONN_STRING:'AZURE-AI-PROJECT-CONN-STRING' DISPLAY_CHART_DEFAULT:'True' } } diff --git a/src/api/ApiApp.Dockerfile b/src/api/ApiApp.Dockerfile index bca9c2d76..a53266f31 100644 --- a/src/api/ApiApp.Dockerfile +++ b/src/api/ApiApp.Dockerfile @@ -1,13 +1,15 @@ FROM python:3.11-alpine # Install system dependencies required for building and running the application -RUN apk add --no-cache --virtual .build-deps \ - build-base \ - libffi-dev \ - openssl-dev \ +RUN apk add --no-cache --virtual .build-deps \ + build-base \ + libffi-dev \ + openssl-dev \ curl \ - unixodbc-dev \ - libpq + unixodbc-dev \ + libpq \ + opus-dev \ + libvpx-dev # Download and install Microsoft ODBC Driver and MSSQL tools RUN curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.10.6.1-1_amd64.apk \ @@ -23,7 +25,8 @@ WORKDIR /app COPY ./requirements.txt . # Install Python dependencies -RUN pip install --no-cache-dir -r requirements.txt && rm -rf /root/.cache +RUN pip install --upgrade pip setuptools wheel \ + && pip install --no-cache-dir -r requirements.txt && rm -rf /root/.cache # Copy the backend application code into the container COPY ./ . @@ -32,4 +35,4 @@ COPY ./ . EXPOSE 80 # Start the application using Uvicorn -CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80"] +CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80"] \ No newline at end of file diff --git a/src/api/common/config/config.py b/src/api/common/config/config.py index 4845aaf1a..92f8f1d35 100644 --- a/src/api/common/config/config.py +++ b/src/api/common/config/config.py @@ -1,6 +1,4 @@ import os -from azure.identity import DefaultAzureCredential -from azure.keyvault.secrets import SecretClient from dotenv import load_dotenv load_dotenv() @@ -8,10 +6,6 @@ class Config: def __init__(self): - # Initialize Key Vault client - key_vault_url = os.getenv("AZURE_KEY_VAULT_URL") - credential = DefaultAzureCredential() - self.secret_client = SecretClient(vault_url=key_vault_url, credential=credential) # SQL Database configuration self.sqldb_database = os.getenv("SQLDB_DATABASE") @@ -23,18 +17,18 @@ def __init__(self): # Azure OpenAI configuration self.azure_openai_endpoint = os.getenv("AZURE_OPEN_AI_ENDPOINT") self.azure_openai_deployment_model = os.getenv("AZURE_OPEN_AI_DEPLOYMENT_MODEL") - self.azure_openai_api_key = self.get_secret("AZURE_OPENAI_API_KEY") + self.azure_openai_api_key = os.getenv("AZURE_OPENAI_API_KEY") self.azure_openai_api_version = os.getenv("AZURE_OPENAI_API_VERSION") self.azure_openai_resource = os.getenv("AZURE_OPENAI_RESOURCE") # Azure AI Search configuration self.azure_ai_search_endpoint = os.getenv("AZURE_AI_SEARCH_ENDPOINT") - self.azure_ai_search_api_key = self.get_secret("AZURE_AI_SEARCH_API_KEY") + self.azure_ai_search_api_key = os.getenv("AZURE_AI_SEARCH_API_KEY") self.azure_ai_search_index = os.getenv("AZURE_AI_SEARCH_INDEX") # AI Project Client configuration self.use_ai_project_client = os.getenv("USE_AI_PROJECT_CLIENT", "False").lower() == "true" - self.azure_ai_project_conn_string = self.get_secret("AZURE_AI_PROJECT_CONN_STRING") + self.azure_ai_project_conn_string = os.getenv("AZURE_AI_PROJECT_CONN_STRING") # Chat history configuration self.use_chat_history_enabled = os.getenv("USE_CHAT_HISTORY_ENABLED", "false").strip().lower() == "true" @@ -42,13 +36,3 @@ def __init__(self): self.azure_cosmosdb_account = os.getenv("AZURE_COSMOSDB_ACCOUNT") self.azure_cosmosdb_conversations_container = os.getenv("AZURE_COSMOSDB_CONVERSATIONS_CONTAINER") self.azure_cosmosdb_enable_feedback = os.getenv("AZURE_COSMOSDB_ENABLE_FEEDBACK", "false").lower() == "true" - - def get_secret(self, secret_name): - """Retrieve a secret value from Azure Key Vault.""" - secret_name_value = os.getenv(secret_name, "") - try: - secret = self.secret_client.get_secret(secret_name_value) - return secret.value - except Exception as e: - print(f"Error retrieving secret '{secret_name_value}': {e}") - return None diff --git a/src/api/plugins/chat_with_data_plugin.py b/src/api/plugins/chat_with_data_plugin.py index 71e447370..0cac3f02b 100644 --- a/src/api/plugins/chat_with_data_plugin.py +++ b/src/api/plugins/chat_with_data_plugin.py @@ -122,6 +122,7 @@ def get_SQL_Response( sql_query = sql_query.replace("```sql", '').replace("```", '') answer = execute_sql_query(sql_query) + answer = answer[:20000] except Exception as e: # 'Information from database could not be retrieved. Please try again later.' diff --git a/src/api/services/chat_service.py b/src/api/services/chat_service.py index 3907ae3cf..fa51f5db5 100644 --- a/src/api/services/chat_service.py +++ b/src/api/services/chat_service.py @@ -122,10 +122,7 @@ async def stream_openai_text(self, conversation_id: str, query: str) -> Streamin api_version=config.azure_openai_api_version, ) - thread_id = thread_cache.get(conversation_id) - if not thread_id: - thread_id = await agent.create_thread() - thread_cache[conversation_id] = thread_id + thread_id = await agent.create_thread() # Add user message to the thread message = ChatMessageContent(role=AuthorRole.USER, content=query) From 9f3c92d8da39ca57dceac7b4062ea63b273bf814 Mon Sep 17 00:00:00 2001 From: Pavan-Microsoft Date: Tue, 15 Apr 2025 17:45:06 +0530 Subject: [PATCH 2/2] updated main.json --- infra/main.json | 67 +++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/infra/main.json b/infra/main.json index c0147c0c1..99ba1b9c4 100644 --- a/infra/main.json +++ b/infra/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.34.44.8038", - "templateHash": "11969070936051168983" + "templateHash": "1028263065130624134" } }, "parameters": { @@ -1961,23 +1961,42 @@ "applicationInsightsId": { "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.applicationInsightsId.value]" }, + "azureOpenAIKey": { + "reference": { + "keyVault": { + "id": "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.KeyVault/vaults', reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.keyvaultName.value)]" + }, + "secretName": "AZURE-OPENAI-KEY" + } + }, + "azureAiProjectConnString": { + "reference": { + "keyVault": { + "id": "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.KeyVault/vaults', reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.keyvaultName.value)]" + }, + "secretName": "AZURE-AI-PROJECT-CONN-STRING" + } + }, + "azureSearchAdminKey": { + "reference": { + "keyVault": { + "id": "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.KeyVault/vaults', reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.keyvaultName.value)]" + }, + "secretName": "AZURE-SEARCH-KEY" + } + }, "solutionName": { "value": "[variables('solutionPrefix')]" }, "userassignedIdentityId": { "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_managed_identity'), '2022-09-01').outputs.managedIdentityBackendAppOutput.value.id]" }, - "keyVaultName": { - "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.keyvaultName.value]" - }, "appSettings": { "value": { "AZURE_OPEN_AI_DEPLOYMENT_MODEL": "[parameters('gptModelName')]", "AZURE_OPEN_AI_ENDPOINT": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.aiServicesTarget.value]", "AZURE_OPENAI_API_VERSION": "[variables('azureOpenAIApiVersion')]", "AZURE_OPENAI_RESOURCE": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.aiServicesName.value]", - "AZURE_OPENAI_API_KEY": "AZURE-OPENAI-KEY", - "AZURE_KEY_VAULT_URL": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_keyvault'), '2022-09-01').outputs.keyvaultUri.value]", "USE_CHAT_HISTORY_ENABLED": "True", "AZURE_COSMOSDB_ACCOUNT": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_cosmos_db'), '2022-09-01').outputs.cosmosAccountName.value]", "AZURE_COSMOSDB_CONVERSATIONS_CONTAINER": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_cosmos_db'), '2022-09-01').outputs.cosmosContainerName.value]", @@ -1990,9 +2009,7 @@ "OPENAI_API_VERSION": "[variables('azureOpenAIApiVersion')]", "AZURE_AI_SEARCH_ENDPOINT": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.aiSearchTarget.value]", "AZURE_AI_SEARCH_INDEX": "call_transcripts_index", - "AZURE_AI_SEARCH_API_KEY": "AZURE-SEARCH-KEY", "USE_AI_PROJECT_CLIENT": "False", - "AZURE_AI_PROJECT_CONN_STRING": "AZURE-AI-PROJECT-CONN-STRING", "DISPLAY_CHART_DEFAULT": "True" } } @@ -2004,7 +2021,7 @@ "_generator": { "name": "bicep", "version": "0.34.44.8038", - "templateHash": "3648197818087330444" + "templateHash": "445807380408189331" } }, "parameters": { @@ -2024,18 +2041,23 @@ "appServicePlanId": { "type": "string" }, - "userassignedIdentityId": { - "type": "string" + "azureOpenAIKey": { + "type": "securestring" }, - "keyVaultName": { + "azureAiProjectConnString": { + "type": "securestring" + }, + "azureSearchAdminKey": { + "type": "securestring" + }, + "userassignedIdentityId": { "type": "string" } }, "variables": { "imageName": "[format('DOCKER|kmcontainerreg.azurecr.io/km-api:{0}', parameters('imageTag'))]", "name": "[format('{0}-api', parameters('solutionName'))]", - "reactAppLayoutConfig": "{\r\n \"appConfig\": {\r\n \"THREE_COLUMN\": {\r\n \"DASHBOARD\": 50,\r\n \"CHAT\": 33,\r\n \"CHATHISTORY\": 17\r\n },\r\n \"TWO_COLUMN\": {\r\n \"DASHBOARD_CHAT\": {\r\n \"DASHBOARD\": 65,\r\n \"CHAT\": 35\r\n },\r\n \"CHAT_CHATHISTORY\": {\r\n \"CHAT\": 80,\r\n \"CHATHISTORY\": 20\r\n }\r\n }\r\n },\r\n \"charts\": [\r\n {\r\n \"id\": \"SATISFIED\",\r\n \"name\": \"Satisfied\",\r\n \"type\": \"card\",\r\n \"layout\": { \"row\": 1, \"column\": 1, \"height\": 11 }\r\n },\r\n {\r\n \"id\": \"TOTAL_CALLS\",\r\n \"name\": \"Total Calls\",\r\n \"type\": \"card\",\r\n \"layout\": { \"row\": 1, \"column\": 2, \"span\": 1 }\r\n },\r\n {\r\n \"id\": \"AVG_HANDLING_TIME\",\r\n \"name\": \"Average Handling Time\",\r\n \"type\": \"card\",\r\n \"layout\": { \"row\": 1, \"column\": 3, \"span\": 1 }\r\n },\r\n {\r\n \"id\": \"SENTIMENT\",\r\n \"name\": \"Topics Overview\",\r\n \"type\": \"donutchart\",\r\n \"layout\": { \"row\": 2, \"column\": 1, \"width\": 40, \"height\": 44.5 }\r\n },\r\n {\r\n \"id\": \"AVG_HANDLING_TIME_BY_TOPIC\",\r\n \"name\": \"Average Handling Time By Topic\",\r\n \"type\": \"bar\",\r\n \"layout\": { \"row\": 2, \"column\": 2, \"row-span\": 2, \"width\": 60 }\r\n },\r\n {\r\n \"id\": \"TOPICS\",\r\n \"name\": \"Trending Topics\",\r\n \"type\": \"table\",\r\n \"layout\": { \"row\": 3, \"column\": 1, \"span\": 2 }\r\n },\r\n {\r\n \"id\": \"KEY_PHRASES\",\r\n \"name\": \"Key Phrases\",\r\n \"type\": \"wordcloud\",\r\n \"layout\": { \"row\": 3, \"column\": 2, \"height\": 44.5 }\r\n }\r\n ]\r\n}", - "keyVaultSecretsOfficerId": "b86a8fe4-44ce-4948-aee5-eccb2c155cd7" + "reactAppLayoutConfig": "{\r\n \"appConfig\": {\r\n \"THREE_COLUMN\": {\r\n \"DASHBOARD\": 50,\r\n \"CHAT\": 33,\r\n \"CHATHISTORY\": 17\r\n },\r\n \"TWO_COLUMN\": {\r\n \"DASHBOARD_CHAT\": {\r\n \"DASHBOARD\": 65,\r\n \"CHAT\": 35\r\n },\r\n \"CHAT_CHATHISTORY\": {\r\n \"CHAT\": 80,\r\n \"CHATHISTORY\": 20\r\n }\r\n }\r\n },\r\n \"charts\": [\r\n {\r\n \"id\": \"SATISFIED\",\r\n \"name\": \"Satisfied\",\r\n \"type\": \"card\",\r\n \"layout\": { \"row\": 1, \"column\": 1, \"height\": 11 }\r\n },\r\n {\r\n \"id\": \"TOTAL_CALLS\",\r\n \"name\": \"Total Calls\",\r\n \"type\": \"card\",\r\n \"layout\": { \"row\": 1, \"column\": 2, \"span\": 1 }\r\n },\r\n {\r\n \"id\": \"AVG_HANDLING_TIME\",\r\n \"name\": \"Average Handling Time\",\r\n \"type\": \"card\",\r\n \"layout\": { \"row\": 1, \"column\": 3, \"span\": 1 }\r\n },\r\n {\r\n \"id\": \"SENTIMENT\",\r\n \"name\": \"Topics Overview\",\r\n \"type\": \"donutchart\",\r\n \"layout\": { \"row\": 2, \"column\": 1, \"width\": 40, \"height\": 44.5 }\r\n },\r\n {\r\n \"id\": \"AVG_HANDLING_TIME_BY_TOPIC\",\r\n \"name\": \"Average Handling Time By Topic\",\r\n \"type\": \"bar\",\r\n \"layout\": { \"row\": 2, \"column\": 2, \"row-span\": 2, \"width\": 60 }\r\n },\r\n {\r\n \"id\": \"TOPICS\",\r\n \"name\": \"Trending Topics\",\r\n \"type\": \"table\",\r\n \"layout\": { \"row\": 3, \"column\": 1, \"span\": 2 }\r\n },\r\n {\r\n \"id\": \"KEY_PHRASES\",\r\n \"name\": \"Key Phrases\",\r\n \"type\": \"wordcloud\",\r\n \"layout\": { \"row\": 3, \"column\": 2, \"height\": 44.5 }\r\n }\r\n ]\r\n}" }, "resources": [ { @@ -2051,20 +2073,6 @@ "[resourceId('Microsoft.Resources/deployments', format('{0}-app-module', variables('name')))]" ] }, - { - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.KeyVault/vaults/{0}', parameters('keyVaultName'))]", - "name": "[guid(resourceId('Microsoft.KeyVault/vaults', parameters('keyVaultName')), subscriptionResourceId('Microsoft.Authorization/roleDefinitions', variables('keyVaultSecretsOfficerId')))]", - "properties": { - "roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', variables('keyVaultSecretsOfficerId'))]", - "principalId": "[reference(resourceId('Microsoft.Resources/deployments', format('{0}-app-module', variables('name'))), '2022-09-01').outputs.identityPrincipalId.value]", - "principalType": "ServicePrincipal" - }, - "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', format('{0}-app-module', variables('name')))]" - ] - }, { "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", @@ -2088,7 +2096,7 @@ "value": "[parameters('userassignedIdentityId')]" }, "appSettings": { - "value": "[union(parameters('appSettings'), createObject('APPINSIGHTS_INSTRUMENTATIONKEY', reference(parameters('applicationInsightsId'), '2015-05-01').InstrumentationKey, 'REACT_APP_LAYOUT_CONFIG', variables('reactAppLayoutConfig')))]" + "value": "[union(parameters('appSettings'), createObject('AZURE_OPENAI_API_KEY', parameters('azureOpenAIKey'), 'AZURE_AI_SEARCH_API_KEY', parameters('azureSearchAdminKey'), 'AZURE_AI_PROJECT_CONN_STRING', parameters('azureAiProjectConnString'), 'APPINSIGHTS_INSTRUMENTATIONKEY', reference(parameters('applicationInsightsId'), '2015-05-01').InstrumentationKey, 'REACT_APP_LAYOUT_CONFIG', variables('reactAppLayoutConfig')))]" } }, "template": { @@ -2273,7 +2281,6 @@ "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry')]", "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_cosmos_db')]", "[resourceId('Microsoft.Resources/deployments', 'deploy_app_service_plan')]", - "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_keyvault')]", "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_managed_identity')]", "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_sql_db')]" ]