Skip to content

Commit 4f1d8d6

Browse files
Merge pull request #404 from microsoft/microhacks-e2e
feat: Microhacks e2e
2 parents 9d35f28 + 56d0807 commit 4f1d8d6

File tree

115 files changed

+4356
-80
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+4356
-80
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
33
################################################################################
44
*.venv
5+
*.myenv
56
*.vscode
67
*.vs
78
/LUISSchemaSerializationTool/.vs
@@ -10,3 +11,4 @@
1011
.fake
1112
.azure
1213
.idea
14+
/myenv

azure.yaml

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,39 +23,4 @@ hooks:
2323
echo $WEB_APP_URL
2424
shell: sh
2525
continueOnError: false
26-
interactive: true
27-
# environment:
28-
# name: conversation-knowledge-mining-solution-accelerator
29-
# location: eastus
30-
31-
# metadata:
32-
# template: [email protected]
33-
# services:
34-
# add-user-scripts:
35-
# project: Deployment/scripts/add_user_scripts
36-
# host: containerapp
37-
# language: python
38-
# app:
39-
# project: App
40-
# host: containerapp
41-
# language: python
42-
# fabric-scripts:
43-
# project: Deployment/scripts/fabric_scripts
44-
# host: containerapp
45-
# language: python
46-
# index-scripts:
47-
# project: Deployment/scripts/index_scripts
48-
# host: containerapp
49-
# language: python
50-
# km-charts-function:
51-
# project: AzureFunctions/km-charts-function
52-
# host: containerapp
53-
# language: python
54-
# docker:
55-
# path: Dockerfile
56-
# km-rag-function:
57-
# project: AzureFunctions/km-rag-function
58-
# host: containerapp
59-
# language: python
60-
# docker:
61-
# path: Dockerfile
26+
interactive: true

docs/CustomizingAzdParameters.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,41 @@ By default this template will use the environment name as the prefix to prevent
88
Change the Content Understanding Location (allowed values: Sweden Central, Australia East)
99

1010
```shell
11-
azd env set AZURE_ENV_CU_LOCATION 'swedencentral'
11+
azd env set AZURE_CONTENT_UNDERSTANDING_LOCATION 'swedencentral'
1212
```
1313

1414
Change the Secondary Location (example: eastus2, westus2, etc.)
1515

1616
```shell
17-
azd env set AZURE_ENV_SECONDARY_LOCATION eastus2
17+
azd env set AZURE_SECONDARY_LOCATION eastus2
1818
```
1919

2020
Change the Model Deployment Type (allowed values: Standard, GlobalStandard)
2121

2222
```shell
23-
azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE GlobalStandard
23+
azd env set AZURE_OPEN_AI_MODEL_DEPLOYMENT_TYPE GlobalStandard
2424
```
2525

2626
Set the Model Name (allowed values: gpt-4o-mini, gpt-4o, gpt-4)
2727

2828
```shell
29-
azd env set AZURE_ENV_MODEL_NAME gpt-4o-mini
29+
azd env set AZURE_OPEN_AI_DEPLOYMENT_MODEL gpt-4o-mini
3030
```
3131

3232
Change the Model Capacity (choose a number based on available GPT model capacity in your subscription)
3333

3434
```shell
35-
azd env set AZURE_ENV_MODEL_CAPACITY 30
35+
azd env set AZURE_OPEN_AI_DEPLOYMENT_MODEL_CAPACITY 30
3636
```
3737

3838
Change the Embedding Model
3939

4040
```shell
41-
azd env set AZURE_ENV_EMBEDDING_MODEL_NAME text-embedding-ada-002
41+
azd env set AZURE_OPENAI_EMBEDDING_MODEL text-embedding-ada-002
4242
```
4343

4444
Change the Embedding Deployment Capacity (choose a number based on available embedding model capacity in your subscription)
4545

4646
```shell
47-
azd env set AZURE_ENV_EMBEDDING_MODEL_CAPACITY 80
47+
azd env set AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY 80
4848
```

infra/deploy_ai_foundry.bicep

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ resource aiServices 'Microsoft.CognitiveServices/accounts@2024-04-01-preview' =
183183
properties: {
184184
customSubDomainName: aiServicesName
185185
// apiProperties: {
186-
// // statisticsEnabled: false
186+
// statisticsEnabled: false
187187
// }
188188
}
189189
}
@@ -697,9 +697,14 @@ output aiSearchId string = aiSearch.id
697697
output aiSearchTarget string = 'https://${aiSearch.name}.search.windows.net'
698698
output aiSearchService string = aiSearch.name
699699
output aiProjectName string = aiHubProject.name
700+
output aiSearchKey string = aiSearch.listAdminKeys().primaryKey
700701

701702
output applicationInsightsId string = applicationInsights.id
702703
output logAnalyticsWorkspaceResourceName string = logAnalytics.name
703704
output storageAccountName string = storageNameCleaned
704705

705706
output azureOpenAIKeyName string = azureOpenAIApiKeyEntry.name
707+
output azureOpenAIKey string = aiServices.listKeys().key1
708+
709+
output azureProjectConnString string = '${split(aiHubProject.properties.discoveryUrl, '/')[2]};${subscription().subscriptionId};${resourceGroup().name};${aiHubProject.name}'
710+
output azureProjectName string = aiHubProject.name

infra/deploy_backend_docker.bicep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,5 @@ resource aiDeveloperAccessProj 'Microsoft.Authorization/roleAssignments@2022-04-
137137
}
138138

139139
output appUrl string = appService.outputs.appUrl
140+
output reactAppLayoutConfig string = reactAppLayoutConfig
141+
output appInsightInstrumentationKey string = reference(applicationInsightsId, '2015-05-01').InstrumentationKey

infra/main.bicep

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,41 @@ module frontend_docker 'deploy_frontend_docker.bicep'= {
239239
scope: resourceGroup(resourceGroup().name)
240240
}
241241

242+
output SOLUTION_NAME string = solutionPrefix
243+
output RESOURCE_GROUP_NAME string = resourceGroup().name
244+
output RESOURCE_GROUP_LOCATION string = solutionLocation
245+
output ENVIRONMENT_NAME string = environmentName
246+
output AZURE_CONTENT_UNDERSTANDING_LOCATION string = contentUnderstandingLocation
247+
output AZURE_SECONDARY_LOCATION string = secondaryLocation
248+
output APPINSIGHTS_INSTRUMENTATIONKEY string = backend_docker.outputs.appInsightInstrumentationKey
249+
output AZURE_AI_PROJECT_CONN_STRING string = aifoundry.outputs.azureProjectConnString
250+
output AZURE_AI_PROJECT_NAME string = aifoundry.outputs.azureProjectName
251+
output AZURE_AI_SEARCH_API_KEY string = aifoundry.outputs.aiSearchKey
252+
output AZURE_AI_SEARCH_ENDPOINT string = aifoundry.outputs.aiSearchTarget
253+
output AZURE_AI_SEARCH_INDEX string = 'call_transcripts_index'
254+
output AZURE_COSMOSDB_ACCOUNT string = cosmosDBModule.outputs.cosmosAccountName
255+
output AZURE_COSMOSDB_CONVERSATIONS_CONTAINER string = 'conversations'
256+
output AZURE_COSMOSDB_DATABASE string = 'db_conversation_history'
257+
output AZURE_COSMOSDB_ENABLE_FEEDBACK string = 'True'
258+
output AZURE_OPEN_AI_DEPLOYMENT_MODEL string = gptModelName
259+
output AZURE_OPEN_AI_DEPLOYMENT_MODEL_CAPACITY int = gptDeploymentCapacity
260+
output AZURE_OPEN_AI_ENDPOINT string = aifoundry.outputs.aiServicesTarget
261+
output AZURE_OPENAI_API_KEY string = aifoundry.outputs.azureOpenAIKey
262+
output AZURE_OPEN_AI_MODEL_DEPLOYMENT_TYPE string = deploymentType
263+
output AZURE_OPENAI_EMBEDDING_MODEL string = embeddingModel
264+
output AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY int = embeddingDeploymentCapacity
265+
output AZURE_OPENAI_API_VERSION string = azureOpenAIApiVersion
266+
output AZURE_OPENAI_RESOURCE string = aifoundry.outputs.aiServicesName
267+
output OPENAI_API_VERSION string = azureOpenAIApiVersion
268+
output REACT_APP_LAYOUT_CONFIG string = backend_docker.outputs.reactAppLayoutConfig
269+
output SQLDB_DATABASE string = sqlDBModule.outputs.sqlDbName
270+
output SQLDB_SERVER string = sqlDBModule.outputs.sqlServerName
271+
output SQLDB_USER_MID string = managedIdentityModule.outputs.managedIdentityBackendAppOutput.clientId
272+
output SQLDB_USERNAME string = sqlDBModule.outputs.sqlDbUser
273+
output USE_AI_PROJECT_CLIENT string = 'False'
274+
output USE_CHAT_HISTORY_ENABLED string = 'True'
275+
output DISPLAY_CHART_DEFAULT string = 'False'
276+
277+
output API_APP_URL string = backend_docker.outputs.appUrl
242278
output WEB_APP_URL string = frontend_docker.outputs.appUrl
279+

infra/main.bicepparam

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using './main.bicep'
22

33
param environmentName = readEnvironmentVariable('AZURE_ENV_NAME', 'env_name')
4-
param contentUnderstandingLocation = readEnvironmentVariable('AZURE_ENV_CU_LOCATION', 'swedencentral')
5-
param secondaryLocation = readEnvironmentVariable('AZURE_ENV_SECONDARY_LOCATION', 'eastus2')
6-
param deploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
7-
param gptModelName = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o-mini')
8-
param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_MODEL_CAPACITY', '30'))
9-
param embeddingModel = readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_NAME', 'text-embedding-ada-002')
10-
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_CAPACITY', '80'))
4+
param contentUnderstandingLocation = readEnvironmentVariable('AZURE_CONTENT_UNDERSTANDING_LOCATION', 'swedencentral')
5+
param secondaryLocation = readEnvironmentVariable('AZURE_SECONDARY_LOCATION', 'eastus2')
6+
param deploymentType = readEnvironmentVariable('AZURE_OPEN_AI_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
7+
param gptModelName = readEnvironmentVariable('AZURE_OPEN_AI_DEPLOYMENT_MODEL', 'gpt-4o-mini')
8+
param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_OPEN_AI_DEPLOYMENT_MODEL_CAPACITY', '30'))
9+
param embeddingModel = readEnvironmentVariable('AZURE_OPENAI_EMBEDDING_MODEL', 'text-embedding-ada-002')
10+
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY', '80'))

0 commit comments

Comments
 (0)