Skip to content

Commit

Permalink
upgrading to gpt-40-mini and text-embedding-3-small
Browse files Browse the repository at this point in the history
  • Loading branch information
dantelmomsft committed Oct 24, 2024
1 parent 34b145f commit 8dc9227
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 39 deletions.
16 changes: 9 additions & 7 deletions deploy/aca/infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ param formRecognizerResourceGroupLocation string = location
param formRecognizerSkuName string = 'S0'

param chatGptDeploymentName string // Set in main.parameters.json
param chatGptDeploymentCapacity int = 60
param chatGptModelName string = 'gpt-35-turbo'
param chatGptModelVersion string = '0613'
param embeddingDeploymentName string // Set in main.parameters.json
param embeddingDeploymentCapacity int = 60
param chatGptDeploymentCapacity int = 80
param chatGptDeploymentSkuName string= 'Standard'
param embeddingModelName string = 'text-embedding-ada-002'
param chatGptModelName string = 'gpt-4o-mini'
param chatGptModelVersion string = '2024-07-18'
param embeddingDeploymentName string // Set in main.parameters.json
param embeddingDeploymentCapacity int = 120

param embeddingModelName string = 'text-embedding-3-small'
param embeddingModelVersion string = '1'

param servicebusNamespace string = ''
param serviceBusSkuName string = 'Standard'
Expand Down Expand Up @@ -317,7 +319,7 @@ module openAi '../../shared/ai/cognitiveservices.bicep' = {
model: {
format: 'OpenAI'
name: embeddingModelName
version: '2'
version: embeddingModelVersion
}
sku: {
name: 'Standard'
Expand Down
19 changes: 14 additions & 5 deletions deploy/aca/infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,31 @@
"value": "${AZURE_STORAGE_SKU=Standard_LRS}"
},
"chatGptModelName": {
"value": "${AZURE_OPENAI_CHATGPT_MODEL=gpt-35-turbo}"
"value": "${AZURE_OPENAI_CHATGPT_MODEL=gpt-4o-mini}"
},
"chatGptModelVersion": {
"value": "${AZURE_OPENAI_CHATGPT_VERSION=0613}"
"value": "${AZURE_OPENAI_CHATGPT_VERSION=2024-07-18}"
},
"chatGptDeploymentName": {
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT=chat}"
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT=gpt-4o-mini}"
},
"chatGptDeploymentCapacity": {
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY=60}"
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY=80}"
},
"chatGptDeploymentSkuName": {
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU_NAME=Standard}"
},
"embeddingModelName": {
"value": "${AZURE_OPENAI_EMB_MODEL=text-embedding-3-small}"
},
"embeddingModelVersion": {
"value": "${AZURE_OPENAI_EMB_MODEL_VERSION=1}"
},
"embeddingDeploymentName": {
"value": "${AZURE_OPENAI_EMB_DEPLOYMENT=embedding}"
"value": "${AZURE_OPENAI_EMB_DEPLOYMENT=text-embedding-3-small}"
},
"embeddingDeploymentCapacity": {
"value": "${AZURE_OPENAI_EMB_DEPLOYMENT_CAPACITY=120}"
},
"useApplicationInsights": {
"value": "${AZURE_USE_APPLICATION_INSIGHTS=true}"
Expand Down
16 changes: 9 additions & 7 deletions deploy/aks/infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ param formRecognizerResourceGroupLocation string = location
param formRecognizerSkuName string = 'S0'

param chatGptDeploymentName string // Set in main.parameters.json
param chatGptDeploymentCapacity int = 60
param chatGptModelName string = 'gpt-35-turbo'
param chatGptModelVersion string = '0613'
param embeddingDeploymentName string // Set in main.parameters.json
param embeddingDeploymentCapacity int = 80
param chatGptDeploymentCapacity int = 80
param chatGptModelName string = 'gpt-4o-mini'
param chatGptModelVersion string = '2024-07-18'
param chatGptDeploymentSkuName string= 'Standard'
param embeddingModelName string = 'text-embedding-ada-002'

param embeddingDeploymentName string // Set in main.parameters.json
param embeddingDeploymentCapacity int = 120
param embeddingModelName string = 'text-embedding-3-small'
param embeddingModelVersion string = '1'

param servicebusNamespace string = ''
param serviceBusSkuName string = 'Standard'
Expand Down Expand Up @@ -187,7 +189,7 @@ module openAi '../../shared/ai/cognitiveservices.bicep' = if (openAiHost == 'azu
model: {
format: 'OpenAI'
name: embeddingModelName
version: '2'
version: embeddingModelVersion
}
sku: {
name: 'Standard'
Expand Down
19 changes: 14 additions & 5 deletions deploy/aks/infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,31 @@
"value": "${AZURE_STORAGE_SKU=Standard_LRS}"
},
"chatGptModelName": {
"value": "${AZURE_OPENAI_CHATGPT_MODEL=gpt-35-turbo}"
"value": "${AZURE_OPENAI_CHATGPT_MODEL=gpt-4o-mini}"
},
"chatGptModelVersion": {
"value": "${AZURE_OPENAI_CHATGPT_VERSION=0613}"
"value": "${AZURE_OPENAI_CHATGPT_VERSION=2024-07-18}"
},
"chatGptDeploymentName": {
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT=chat}"
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT=gpt-4o-mini}"
},
"chatGptDeploymentCapacity": {
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY=60}"
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY=80}"
},
"chatGptDeploymentSkuName": {
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU_NAME=Standard}"
},
"embeddingModelName": {
"value": "${AZURE_OPENAI_EMB_MODEL=text-embedding-3-small}"
},
"embeddingModelVersion": {
"value": "${AZURE_OPENAI_EMB_MODEL_VERSION=1}"
},
"embeddingDeploymentName": {
"value": "${AZURE_OPENAI_EMB_DEPLOYMENT=embedding}"
"value": "${AZURE_OPENAI_EMB_DEPLOYMENT=text-embedding-3-small}"
},
"embeddingDeploymentCapacity": {
"value": "${AZURE_OPENAI_EMB_DEPLOYMENT_CAPACITY=120}"
},
"openAiHost":{
"value": "${OPENAI_HOST=azure}"
Expand Down
30 changes: 20 additions & 10 deletions deploy/app-service/infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ param location string

param appServicePlanName string = ''
param backendServiceName string = ''
param indexServiceName string = ''
//param indexServiceName string = ''
param resourceGroupName string = ''

param applicationInsightsDashboardName string = ''
Expand Down Expand Up @@ -39,8 +39,8 @@ param openAiHost string // Set in main.parameters.json

param openAiServiceName string = ''
param openAiResourceGroupName string = ''
@description('Location for the OpenAI resource group')
@allowed(['canadaeast', 'eastus', 'eastus2', 'francecentral', 'switzerlandnorth', 'uksouth', 'japaneast', 'northcentralus', 'australiaeast', 'swedencentral'])
@description('Location for the OpenAI resource group. Options are constrained by text-embedding-3-small limited deployments regions')
@allowed(['canadaeast', 'eastus', 'eastus2', 'japaneast'])
@metadata({
azd: {
type: 'location'
Expand All @@ -61,13 +61,14 @@ param formRecognizerResourceGroupLocation string = location
param formRecognizerSkuName string = 'S0'

param chatGptDeploymentName string // Set in main.parameters.json
param chatGptDeploymentCapacity int = 60
param chatGptDeploymentCapacity int = 80
param chatGptDeploymentSkuName string= 'Standard'
param chatGptModelName string = 'gpt-35-turbo'
param chatGptModelVersion string = '0613'
param chatGptModelName string = 'gpt-4o-mini'
param chatGptModelVersion string = '2024-07-18'
param embeddingDeploymentName string // Set in main.parameters.json
param embeddingDeploymentCapacity int = 80
param embeddingModelName string = 'text-embedding-ada-002'
param embeddingDeploymentCapacity int = 120
param embeddingModelName string = 'text-embedding-3-small'
param embeddingModelVersion string = '1'

// Used for the optional login and document level access control system
param useAuthentication bool = false
Expand Down Expand Up @@ -189,6 +190,7 @@ module backend '../../shared/host/appservice.bicep' = {
}
}

/*
module indexer '../../shared/host/functions.bicep' = {
name: 'indexer'
scope: resourceGroup
Expand Down Expand Up @@ -220,6 +222,7 @@ module indexer '../../shared/host/functions.bicep' = {
}
}
*/
module openAi '../../shared/ai/cognitiveservices.bicep' = if (openAiHost == 'azure') {
name: 'openai'
scope: openAiResourceGroup
Expand Down Expand Up @@ -248,7 +251,7 @@ module openAi '../../shared/ai/cognitiveservices.bicep' = if (openAiHost == 'azu
model: {
format: 'OpenAI'
name: embeddingModelName
version: '2'
version: embeddingModelVersion
}
sku: {
name: 'Standard'
Expand Down Expand Up @@ -399,6 +402,7 @@ module openAiRoleBackend '../../shared/security/role.bicep' = if (openAiHost ==
}
}

/*
module openAiRoleIndexer '../../shared/security/role.bicep' = {
scope: openAiResourceGroup
name: 'openai-role-indexer'
Expand All @@ -408,6 +412,7 @@ module openAiRoleIndexer '../../shared/security/role.bicep' = {
principalType: 'ServicePrincipal'
}
}
*/

module storageRoleBackend '../../shared/security/role.bicep' = {
scope: storageResourceGroup
Expand All @@ -419,6 +424,7 @@ module storageRoleBackend '../../shared/security/role.bicep' = {
}
}

/*
module storageRoleIndexer '../../shared/security/role.bicep' = {
scope: storageResourceGroup
name: 'storage-role-indexer'
Expand All @@ -429,6 +435,8 @@ module storageRoleIndexer '../../shared/security/role.bicep' = {
}
}
*/

module searchRoleBackend '../../shared/security/role.bicep' = {
scope: searchServiceResourceGroup
name: 'search-role-backend'
Expand All @@ -439,6 +447,7 @@ module searchRoleBackend '../../shared/security/role.bicep' = {
}
}

/*
module searchRoleIndexer '../../shared/security/role.bicep' = {
scope: searchServiceResourceGroup
name: 'search-role-indexer'
Expand All @@ -458,6 +467,7 @@ module formRecognizerRoleIndexer '../../shared/security/role.bicep' = {
principalType: 'ServicePrincipal'
}
}
*/

output AZURE_LOCATION string = location
output AZURE_TENANT_ID string = tenant().tenantId
Expand Down Expand Up @@ -488,4 +498,4 @@ output AZURE_STORAGE_CONTAINER string = storageContainerName
output AZURE_STORAGE_RESOURCE_GROUP string = storageResourceGroup.name

output BACKEND_URI string = backend.outputs.uri
output INDEXER_FUNCTIONAPP_NAME string = indexer.outputs.name
//output INDEXER_FUNCTIONAPP_NAME string = indexer.outputs.name
19 changes: 14 additions & 5 deletions deploy/app-service/infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,31 @@
"value": "${AZURE_STORAGE_SKU=Standard_LRS}"
},
"chatGptModelName": {
"value": "${AZURE_OPENAI_CHATGPT_MODEL=gpt-35-turbo}"
"value": "${AZURE_OPENAI_CHATGPT_MODEL=gpt-4o-mini}"
},
"chatGptModelVersion": {
"value": "${AZURE_OPENAI_CHATGPT_VERSION=0613}"
"value": "${AZURE_OPENAI_CHATGPT_VERSION=2024-07-18}"
},
"chatGptDeploymentName": {
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT=chat}"
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT=gpt-4o-mini}"
},
"chatGptDeploymentCapacity": {
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY=60}"
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY=80}"
},
"chatGptDeploymentSkuName": {
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU_NAME=Standard}"
},
"embeddingModelName": {
"value": "${AZURE_OPENAI_EMB_MODEL=text-embedding-3-small}"
},
"embeddingModelVersion": {
"value": "${AZURE_OPENAI_EMB_MODEL_VERSION=1}"
},
"embeddingDeploymentName": {
"value": "${AZURE_OPENAI_EMB_DEPLOYMENT=embedding}"
"value": "${AZURE_OPENAI_EMB_DEPLOYMENT=text-embedding-3-small}"
},
"embeddingDeploymentCapacity": {
"value": "${AZURE_OPENAI_EMB_DEPLOYMENT_CAPACITY=120}"
},
"openAiHost":{
"value": "${OPENAI_HOST=azure}"
Expand Down

0 comments on commit 8dc9227

Please sign in to comment.