From 8dc9227398f4d255beda87f93104ddec80a6fdef Mon Sep 17 00:00:00 2001 From: dantelmomsft Date: Thu, 24 Oct 2024 18:18:53 +0200 Subject: [PATCH] upgrading to gpt-40-mini and text-embedding-3-small --- deploy/aca/infra/main.bicep | 16 +++++----- deploy/aca/infra/main.parameters.json | 19 ++++++++---- deploy/aks/infra/main.bicep | 16 +++++----- deploy/aks/infra/main.parameters.json | 19 ++++++++---- deploy/app-service/infra/main.bicep | 30 ++++++++++++------- deploy/app-service/infra/main.parameters.json | 19 ++++++++---- 6 files changed, 80 insertions(+), 39 deletions(-) diff --git a/deploy/aca/infra/main.bicep b/deploy/aca/infra/main.bicep index 70ebef2..5aca155 100644 --- a/deploy/aca/infra/main.bicep +++ b/deploy/aca/infra/main.bicep @@ -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' @@ -317,7 +319,7 @@ module openAi '../../shared/ai/cognitiveservices.bicep' = { model: { format: 'OpenAI' name: embeddingModelName - version: '2' + version: embeddingModelVersion } sku: { name: 'Standard' diff --git a/deploy/aca/infra/main.parameters.json b/deploy/aca/infra/main.parameters.json index 8a2a7d0..f1190bf 100644 --- a/deploy/aca/infra/main.parameters.json +++ b/deploy/aca/infra/main.parameters.json @@ -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}" diff --git a/deploy/aks/infra/main.bicep b/deploy/aks/infra/main.bicep index 05d057c..110b5e5 100644 --- a/deploy/aks/infra/main.bicep +++ b/deploy/aks/infra/main.bicep @@ -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' @@ -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' diff --git a/deploy/aks/infra/main.parameters.json b/deploy/aks/infra/main.parameters.json index dd64bd0..08e1294 100644 --- a/deploy/aks/infra/main.parameters.json +++ b/deploy/aks/infra/main.parameters.json @@ -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}" diff --git a/deploy/app-service/infra/main.bicep b/deploy/app-service/infra/main.bicep index 1a1d843..2a42954 100644 --- a/deploy/app-service/infra/main.bicep +++ b/deploy/app-service/infra/main.bicep @@ -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 = '' @@ -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' @@ -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 @@ -189,6 +190,7 @@ module backend '../../shared/host/appservice.bicep' = { } } +/* module indexer '../../shared/host/functions.bicep' = { name: 'indexer' scope: resourceGroup @@ -220,6 +222,7 @@ module indexer '../../shared/host/functions.bicep' = { } } +*/ module openAi '../../shared/ai/cognitiveservices.bicep' = if (openAiHost == 'azure') { name: 'openai' scope: openAiResourceGroup @@ -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' @@ -399,6 +402,7 @@ module openAiRoleBackend '../../shared/security/role.bicep' = if (openAiHost == } } +/* module openAiRoleIndexer '../../shared/security/role.bicep' = { scope: openAiResourceGroup name: 'openai-role-indexer' @@ -408,6 +412,7 @@ module openAiRoleIndexer '../../shared/security/role.bicep' = { principalType: 'ServicePrincipal' } } +*/ module storageRoleBackend '../../shared/security/role.bicep' = { scope: storageResourceGroup @@ -419,6 +424,7 @@ module storageRoleBackend '../../shared/security/role.bicep' = { } } +/* module storageRoleIndexer '../../shared/security/role.bicep' = { scope: storageResourceGroup name: 'storage-role-indexer' @@ -429,6 +435,8 @@ module storageRoleIndexer '../../shared/security/role.bicep' = { } } +*/ + module searchRoleBackend '../../shared/security/role.bicep' = { scope: searchServiceResourceGroup name: 'search-role-backend' @@ -439,6 +447,7 @@ module searchRoleBackend '../../shared/security/role.bicep' = { } } +/* module searchRoleIndexer '../../shared/security/role.bicep' = { scope: searchServiceResourceGroup name: 'search-role-indexer' @@ -458,6 +467,7 @@ module formRecognizerRoleIndexer '../../shared/security/role.bicep' = { principalType: 'ServicePrincipal' } } +*/ output AZURE_LOCATION string = location output AZURE_TENANT_ID string = tenant().tenantId @@ -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 diff --git a/deploy/app-service/infra/main.parameters.json b/deploy/app-service/infra/main.parameters.json index dd64bd0..08e1294 100644 --- a/deploy/app-service/infra/main.parameters.json +++ b/deploy/app-service/infra/main.parameters.json @@ -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}"