diff --git a/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/main.bicep b/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/main.bicep index 5ce8f64b6f795..6af512421a5bc 100644 --- a/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/main.bicep +++ b/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/main.bicep @@ -149,6 +149,7 @@ resource appServiceWebConfig 'Microsoft.Web/sites/config@2022-09-01' = { netFrameworkVersion: 'v6.0' use32BitWorkerProcess: false vnetRouteAllEnabled: true + webSocketsEnabled: true appSettings: [ { name: 'AIService:Type' @@ -595,6 +596,37 @@ resource sessionContainer 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases/co } } +resource participantContainer 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers@2023-04-15' = if (deployCosmosDB) { + parent: cosmosDatabase + name: 'chatparticipants' + properties: { + resource: { + id: 'chatparticipants' + indexingPolicy: { + indexingMode: 'consistent' + automatic: true + includedPaths: [ + { + path: '/*' + } + ] + excludedPaths: [ + { + path: '/"_etag"/?' + } + ] + } + partitionKey: { + paths: [ + '/id' + ] + kind: 'Hash' + version: 2 + } + } + } +} + resource speechAccount 'Microsoft.CognitiveServices/accounts@2022-12-01' = if (deploySpeechServices) { name: 'cog-${uniqueName}' location: location diff --git a/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-existing-azureopenai.json b/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-existing-azureopenai.json index 24813b185c64f..5938fcf263b70 100644 --- a/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-existing-azureopenai.json +++ b/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-existing-azureopenai.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.17.1.54307", - "templateHash": "4414214024449267703" + "templateHash": "11779741438695372787" } }, "parameters": { @@ -163,7 +163,7 @@ "_generator": { "name": "bicep", "version": "0.17.1.54307", - "templateHash": "13834272519683618494" + "templateHash": "11121756795286782434" } }, "parameters": { @@ -401,6 +401,7 @@ "netFrameworkVersion": "v6.0", "use32BitWorkerProcess": false, "vnetRouteAllEnabled": true, + "webSocketsEnabled": true, "appSettings": [ { "name": "AIService:Type", @@ -899,6 +900,41 @@ "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', toLower(format('cosmos-{0}', variables('uniqueName'))), 'CopilotChat')]" ] }, + { + "condition": "[parameters('deployCosmosDB')]", + "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers", + "apiVersion": "2023-04-15", + "name": "[format('{0}/{1}/{2}', toLower(format('cosmos-{0}', variables('uniqueName'))), 'CopilotChat', 'chatparticipants')]", + "properties": { + "resource": { + "id": "chatparticipants", + "indexingPolicy": { + "indexingMode": "consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*" + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] + }, + "partitionKey": { + "paths": [ + "/id" + ], + "kind": "Hash", + "version": 2 + } + } + }, + "dependsOn": [ + "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', toLower(format('cosmos-{0}', variables('uniqueName'))), 'CopilotChat')]" + ] + }, { "condition": "[parameters('deploySpeechServices')]", "type": "Microsoft.CognitiveServices/accounts", diff --git a/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-existing-openai.json b/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-existing-openai.json index 1a92c5fdaa588..793d2894fadf4 100644 --- a/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-existing-openai.json +++ b/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-existing-openai.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.17.1.54307", - "templateHash": "15686037844465739324" + "templateHash": "697508036669684325" } }, "parameters": { @@ -158,7 +158,7 @@ "_generator": { "name": "bicep", "version": "0.17.1.54307", - "templateHash": "13834272519683618494" + "templateHash": "11121756795286782434" } }, "parameters": { @@ -396,6 +396,7 @@ "netFrameworkVersion": "v6.0", "use32BitWorkerProcess": false, "vnetRouteAllEnabled": true, + "webSocketsEnabled": true, "appSettings": [ { "name": "AIService:Type", @@ -894,6 +895,41 @@ "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', toLower(format('cosmos-{0}', variables('uniqueName'))), 'CopilotChat')]" ] }, + { + "condition": "[parameters('deployCosmosDB')]", + "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers", + "apiVersion": "2023-04-15", + "name": "[format('{0}/{1}/{2}', toLower(format('cosmos-{0}', variables('uniqueName'))), 'CopilotChat', 'chatparticipants')]", + "properties": { + "resource": { + "id": "chatparticipants", + "indexingPolicy": { + "indexingMode": "consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*" + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] + }, + "partitionKey": { + "paths": [ + "/id" + ], + "kind": "Hash", + "version": 2 + } + } + }, + "dependsOn": [ + "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', toLower(format('cosmos-{0}', variables('uniqueName'))), 'CopilotChat')]" + ] + }, { "condition": "[parameters('deploySpeechServices')]", "type": "Microsoft.CognitiveServices/accounts", diff --git a/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-new.json b/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-new.json index 4ff96e90bb060..18c5ce2eacfd0 100644 --- a/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-new.json +++ b/samples/apps/copilot-chat-app/webapi/DeploymentTemplates/sk-new.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.17.1.54307", - "templateHash": "5066471234853584573" + "templateHash": "3338430546815090156" } }, "parameters": { @@ -145,7 +145,7 @@ "_generator": { "name": "bicep", "version": "0.17.1.54307", - "templateHash": "13834272519683618494" + "templateHash": "11121756795286782434" } }, "parameters": { @@ -383,6 +383,7 @@ "netFrameworkVersion": "v6.0", "use32BitWorkerProcess": false, "vnetRouteAllEnabled": true, + "webSocketsEnabled": true, "appSettings": [ { "name": "AIService:Type", @@ -881,6 +882,41 @@ "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', toLower(format('cosmos-{0}', variables('uniqueName'))), 'CopilotChat')]" ] }, + { + "condition": "[parameters('deployCosmosDB')]", + "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers", + "apiVersion": "2023-04-15", + "name": "[format('{0}/{1}/{2}', toLower(format('cosmos-{0}', variables('uniqueName'))), 'CopilotChat', 'chatparticipants')]", + "properties": { + "resource": { + "id": "chatparticipants", + "indexingPolicy": { + "indexingMode": "consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*" + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] + }, + "partitionKey": { + "paths": [ + "/id" + ], + "kind": "Hash", + "version": 2 + } + } + }, + "dependsOn": [ + "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', toLower(format('cosmos-{0}', variables('uniqueName'))), 'CopilotChat')]" + ] + }, { "condition": "[parameters('deploySpeechServices')]", "type": "Microsoft.CognitiveServices/accounts",