diff --git a/.github/workflows/evaluations.yaml b/.github/workflows/evaluations.yaml index 07110d1b..4591e0b7 100644 --- a/.github/workflows/evaluations.yaml +++ b/.github/workflows/evaluations.yaml @@ -25,7 +25,7 @@ jobs: AZURE_OPENAI_ENDPOINT: ${{ vars.AZURE_OPENAI_ENDPOINT }} AZURE_OPENAI_API_VERSION: ${{ vars.AZURE_OPENAI_API_VERSION }} AZURE_OPENAI_4_EVAL_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_4_EVAL_DEPLOYMENT_NAME }} - AZURE_OPENAI_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_DEPLOYMENT_NAME }} + AZURE_OPENAI_CHAT_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_CHAT_DEPLOYMENT_NAME }} AZURE_OPENAI_35_TURBO_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_35_TURBO_DEPLOYMENT_NAME }} AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }} AZURE_SEARCH_ENDPOINT: ${{ vars.AZURE_SEARCH_ENDPOINT }} diff --git a/docker-compose.yml b/docker-compose.yml index 5591d725..e0099530 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: build: context: src/api ports: - - "5000:80" + - "80:80" env_file: - .env environment: diff --git a/infra/app/aca.bicep b/infra/app/aca.bicep index 52205619..b434407a 100644 --- a/infra/app/aca.bicep +++ b/infra/app/aca.bicep @@ -68,7 +68,7 @@ module app '../core/host/container-app-upsert.bicep' = { value: openAiEndpoint } { - name: 'AZURE_OPENAI_DEPLOYMENT' + name: 'AZURE_OPENAI_CHAT_DEPLOYMENT' value: openAiDeploymentName } { diff --git a/infra/hooks/postprovision.ps1 b/infra/hooks/postprovision.ps1 index 0af4f55e..7937ec3d 100644 --- a/infra/hooks/postprovision.ps1 +++ b/infra/hooks/postprovision.ps1 @@ -4,7 +4,7 @@ Write-Output "Building contosochatapi:latest..." az acr build --subscription $env:AZURE_SUBSCRIPTION_ID --registry $env:AZURE_CONTAINER_REGISTRY_NAME --image contosochatapi:latest ./src/api/ $image_name = $env:AZURE_CONTAINER_REGISTRY_NAME + '.azurecr.io/contosochatapi:latest' az containerapp update --subscription $env:AZURE_SUBSCRIPTION_ID --name $env:SERVICE_ACA_NAME --resource-group $env:AZURE_RESOURCE_GROUP --image $image_name -az containerapp ingress update --subscription $env:AZURE_SUBSCRIPTION_ID --name $env:SERVICE_ACA_NAME --resource-group $env:AZURE_RESOURCE_GROUP --target-port 5000 +az containerapp ingress update --subscription $env:AZURE_SUBSCRIPTION_ID --name $env:SERVICE_ACA_NAME --resource-group $env:AZURE_RESOURCE_GROUP --target-port 80 Write-Host "Starting postprovisioning..." diff --git a/infra/hooks/postprovision.sh b/infra/hooks/postprovision.sh index ae25510d..77e4a26f 100755 --- a/infra/hooks/postprovision.sh +++ b/infra/hooks/postprovision.sh @@ -4,7 +4,7 @@ echo "Building contosochatapi:latest..." az acr build --subscription ${AZURE_SUBSCRIPTION_ID} --registry ${AZURE_CONTAINER_REGISTRY_NAME} --image contosochatapi:latest ./src/api/ image_name="${AZURE_CONTAINER_REGISTRY_NAME}.azurecr.io/contosochatapi:latest" az containerapp update --subscription ${AZURE_SUBSCRIPTION_ID} --name ${SERVICE_ACA_NAME} --resource-group ${AZURE_RESOURCE_GROUP} --image ${image_name} -az containerapp ingress update --subscription ${AZURE_SUBSCRIPTION_ID} --name ${SERVICE_ACA_NAME} --resource-group ${AZURE_RESOURCE_GROUP} --target-port 5000 +az containerapp ingress update --subscription ${AZURE_SUBSCRIPTION_ID} --name ${SERVICE_ACA_NAME} --resource-group ${AZURE_RESOURCE_GROUP} --target-port 80 # Retrieve service names, resource group name, and other values from environment variables diff --git a/infra/main.bicep b/infra/main.bicep index 0647bb1b..0395ed83 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -64,7 +64,7 @@ param useSearch bool = true var aiConfig = loadYamlContent('./ai.yaml') @description('The API version of the OpenAI resource') -param openAiApiVersion string = '' +param openAiApiVersion string = '2023-03-15-preview' @description('The type of the OpenAI resource') param openAiType string = 'azure' @@ -76,7 +76,7 @@ param searchServiceName string = '' param cosmosAccountName string = '' @description('The name of the OpenAI embedding deployment') -param openAiEmbeddingDeploymentName string = '' +param openAiEmbeddingDeploymentName string = 'text-embedding-ada-002' @description('The name of the AI search index') param aiSearchIndexName string = 'contoso-products' @@ -301,7 +301,7 @@ module userCosmosAccountRole 'core/security/role-cosmos.bicep' = if (!empty(prin output AZURE_LOCATION string = location output AZURE_RESOURCE_GROUP string = resourceGroup.name -output AZURE_OPENAI_DEPLOYMENT string = openAiDeploymentName +output AZURE_OPENAI_CHAT_DEPLOYMENT string = openAiDeploymentName output AZURE_OPENAI_API_VERSION string = openAiApiVersion output AZURE_OPENAI_ENDPOINT string = ai.outputs.openAiEndpoint output AZURE_OPENAI_NAME string = ai.outputs.openAiName diff --git a/infra/main.parameters.json b/infra/main.parameters.json index a107ae02..fa9fcd6c 100644 --- a/infra/main.parameters.json +++ b/infra/main.parameters.json @@ -16,10 +16,10 @@ "value": "${AZURE_OPENAI_API_VERSION=2023-07-01-preview}" }, "openAiEmbeddingDeploymentName": { - "value": "${AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME=text-embedding-ada-002}" + "value": "${AZURE_EMBEDDING_NAME=text-embedding-ada-002}" }, "openAiDeploymentName": { - "value": "${AZURE_OPENAI_DEPLOYMENT_NAME=gpt-35-turbo}" + "value": "${AZURE_OPENAI_CHAT_DEPLOYMENT_NAME=gpt-35-turbo}" }, "principalId": { "value": "${AZURE_PRINCIPAL_ID}"