Skip to content

Commit c848a44

Browse files
authored
Merge pull request microsoft#423 from microsoft/gpt-4o
Update deployment to gpt-4o
2 parents 0d19294 + db658c5 commit c848a44

File tree

10 files changed

+49
-293
lines changed

10 files changed

+49
-293
lines changed

docs/8-extensions.md

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ As an example you can create an extension that calls Bing Search API to search f
4747

4848
In the example below only the `query` is required as Bing does not require a body parameter.
4949

50+
> [!NOTE]
51+
> As header values specified for an extension often contain secrets (e.g. API keys) Azure Chat stores those values securely in Azure Key Vault. If you are deploying the solution to Azure using azd or the bicep templates the required Key Vault role assignment is automatically created. If you are running the solution locally you will need to manually add the "Key Vault Secrets Officer" role to identy that is running the solution (wh8ch will typically be the user logged into the Azure CLI)
52+
5053
# Bing Search Extension
5154

5255
1. **Name**: `Bing Search`

docs/migration.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
# Migration
1+
# Migration 2.1
2+
3+
The new changes merges GPT-4 and GPT-4 Vision models into a single GPT-4o model. This allows multi-modal inputs and generates text as an output. The new model is available within the following [regions](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-preview-model-availability).
4+
5+
# Migration 2.0
26

37
The following changes and services are required to migrate from the old version to the new version.
48

59
Refer the `.env.example` file for the latest environment variable changes.
610

711
If you previously had Azure Chat running and have pulled the v2 version you will need at minimum to make the following changes:
812

9-
* Change the "OPENAI_API_KEY" environment setting to "AZURE_OPENAI_API_KEY"
10-
* Add an additional container to your Cosmos DB database called "config" with a partition key of "/userId"
11-
* Add the "AZURE_KEY_VAULT_NAME" environment setting with the name of your Azure Key Vault
12-
* Add the "New Azure Services" settings below if you wish to use these features
13+
- Change the "OPENAI_API_KEY" environment setting to "AZURE_OPENAI_API_KEY"
14+
- Add an additional container to your Cosmos DB database called "config" with a partition key of "/userId"
15+
- Add the "AZURE_KEY_VAULT_NAME" environment setting with the name of your Azure Key Vault
16+
- Add the "New Azure Services" settings below if you wish to use these features
1317

1418
## New Azure Services
1519

infra/main.bicep

+5-22
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ param location string
2020
param openAILocation string
2121

2222
param openAISku string = 'S0'
23-
param openAIApiVersion string = '2023-12-01-preview'
23+
param openAIApiVersion string ='2024-08-01-preview'
2424

25-
param chatGptDeploymentCapacity int = 120
26-
param chatGptDeploymentName string = 'chat-gpt-35-turbo'
27-
param chatGptModelName string = 'gpt-35-turbo'
28-
param chatGptModelVersion string = '1106'
25+
param chatGptDeploymentCapacity int = 30
26+
param chatGptDeploymentName string = 'gpt-4o'
27+
param chatGptModelName string = 'gpt-4o'
28+
param chatGptModelVersion string = '2024-05-13'
2929
param embeddingDeploymentName string = 'embedding'
3030
param embeddingDeploymentCapacity int = 120
3131
param embeddingModelName string = 'text-embedding-ada-002'
@@ -40,17 +40,6 @@ param dalleDeploymentName string = 'dall-e-3'
4040
param dalleModelName string = 'dall-e-3'
4141
param dalleApiVersion string = '2023-12-01-preview'
4242

43-
// DALL-E v3 only supported in Sweden Central for now
44-
@description('Location for the GPT vision instance resource')
45-
@allowed(['swedencentral','westus',])
46-
param gptvisionLocation string
47-
48-
param gptvisionDeploymentCapacity int = 1
49-
param gptvisionDeploymentName string = 'gpt-4-vision'
50-
param gptvisionModelName string = 'gpt-4'
51-
param gptvisionApiVersion string = '2023-12-01-preview'
52-
param gptvisionModelVersion string = 'vision-preview'
53-
5443
param formRecognizerSkuName string = 'S0'
5544
param searchServiceIndexName string = 'azure-chat'
5645
param searchServiceSkuName string = 'standard'
@@ -93,12 +82,6 @@ module resources 'resources.bicep' = {
9382
dalleDeploymentName: dalleDeploymentName
9483
dalleModelName: dalleModelName
9584
dalleApiVersion: dalleApiVersion
96-
gptvisionLocation: gptvisionLocation
97-
gptvisionApiVersion: gptvisionApiVersion
98-
gptvisionDeploymentCapacity: gptvisionDeploymentCapacity
99-
gptvisionDeploymentName: gptvisionDeploymentName
100-
gptvisionModelName: gptvisionModelName
101-
gptvisionModelVersion: gptvisionModelVersion
10285
formRecognizerSkuName: formRecognizerSkuName
10386
searchServiceIndexName: searchServiceIndexName
10487
searchServiceSkuName: searchServiceSkuName

infra/main.json

+18-162
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"metadata": {
55
"_generator": {
66
"name": "bicep",
7-
"version": "0.24.24.22086",
8-
"templateHash": "16779160080190232837"
7+
"version": "0.29.47.4906",
8+
"templateHash": "18214004695586675733"
99
}
1010
},
1111
"parameters": {
@@ -48,23 +48,23 @@
4848
},
4949
"openAIApiVersion": {
5050
"type": "string",
51-
"defaultValue": "2023-12-01-preview"
51+
"defaultValue": "2024-05-13"
5252
},
5353
"chatGptDeploymentCapacity": {
5454
"type": "int",
55-
"defaultValue": 120
55+
"defaultValue": 30
5656
},
5757
"chatGptDeploymentName": {
5858
"type": "string",
59-
"defaultValue": "chat-gpt-35-turbo"
59+
"defaultValue": "gpt-4o"
6060
},
6161
"chatGptModelName": {
6262
"type": "string",
63-
"defaultValue": "gpt-35-turbo"
63+
"defaultValue": "gpt-4o"
6464
},
6565
"chatGptModelVersion": {
6666
"type": "string",
67-
"defaultValue": "1106"
67+
"defaultValue": "2024-05-13"
6868
},
6969
"embeddingDeploymentName": {
7070
"type": "string",
@@ -103,36 +103,6 @@
103103
"type": "string",
104104
"defaultValue": "2023-12-01-preview"
105105
},
106-
"gptvisionLocation": {
107-
"type": "string",
108-
"allowedValues": [
109-
"swedencentral",
110-
"westus"
111-
],
112-
"metadata": {
113-
"description": "Location for the GPT vision instance resource"
114-
}
115-
},
116-
"gptvisionDeploymentCapacity": {
117-
"type": "int",
118-
"defaultValue": 1
119-
},
120-
"gptvisionDeploymentName": {
121-
"type": "string",
122-
"defaultValue": "gpt-4-vision"
123-
},
124-
"gptvisionModelName": {
125-
"type": "string",
126-
"defaultValue": "gpt-4"
127-
},
128-
"gptvisionApiVersion": {
129-
"type": "string",
130-
"defaultValue": "2023-12-01-preview"
131-
},
132-
"gptvisionModelVersion": {
133-
"type": "string",
134-
"defaultValue": "vision-preview"
135-
},
136106
"formRecognizerSkuName": {
137107
"type": "string",
138108
"defaultValue": "S0"
@@ -239,24 +209,6 @@
239209
"dalleApiVersion": {
240210
"value": "[parameters('dalleApiVersion')]"
241211
},
242-
"gptvisionLocation": {
243-
"value": "[parameters('gptvisionLocation')]"
244-
},
245-
"gptvisionApiVersion": {
246-
"value": "[parameters('gptvisionApiVersion')]"
247-
},
248-
"gptvisionDeploymentCapacity": {
249-
"value": "[parameters('gptvisionDeploymentCapacity')]"
250-
},
251-
"gptvisionDeploymentName": {
252-
"value": "[parameters('gptvisionDeploymentName')]"
253-
},
254-
"gptvisionModelName": {
255-
"value": "[parameters('gptvisionModelName')]"
256-
},
257-
"gptvisionModelVersion": {
258-
"value": "[parameters('gptvisionModelVersion')]"
259-
},
260212
"formRecognizerSkuName": {
261213
"value": "[parameters('formRecognizerSkuName')]"
262214
},
@@ -282,8 +234,8 @@
282234
"metadata": {
283235
"_generator": {
284236
"name": "bicep",
285-
"version": "0.24.24.22086",
286-
"templateHash": "14077555141603956691"
237+
"version": "0.29.47.4906",
238+
"templateHash": "18109441359842852578"
287239
}
288240
},
289241
"parameters": {
@@ -301,36 +253,28 @@
301253
"type": "string"
302254
},
303255
"openAiSkuName": {
304-
"type": "string",
305-
"defaultValue": "S0"
256+
"type": "string"
306257
},
307258
"chatGptDeploymentCapacity": {
308-
"type": "int",
309-
"defaultValue": 30
259+
"type": "int"
310260
},
311261
"chatGptDeploymentName": {
312-
"type": "string",
313-
"defaultValue": "chat-gpt-35-turbo"
262+
"type": "string"
314263
},
315264
"chatGptModelName": {
316-
"type": "string",
317-
"defaultValue": "chat-gpt-35-turbo"
265+
"type": "string"
318266
},
319267
"chatGptModelVersion": {
320-
"type": "string",
321-
"defaultValue": "1106"
268+
"type": "string"
322269
},
323270
"embeddingDeploymentName": {
324-
"type": "string",
325-
"defaultValue": "text-embedding-ada-002"
271+
"type": "string"
326272
},
327273
"embeddingDeploymentCapacity": {
328-
"type": "int",
329-
"defaultValue": 10
274+
"type": "int"
330275
},
331276
"embeddingModelName": {
332-
"type": "string",
333-
"defaultValue": "text-embedding-ada-002"
277+
"type": "string"
334278
},
335279
"dalleLocation": {
336280
"type": "string"
@@ -347,29 +291,6 @@
347291
"dalleApiVersion": {
348292
"type": "string"
349293
},
350-
"gptvisionLocation": {
351-
"type": "string"
352-
},
353-
"gptvisionDeploymentCapacity": {
354-
"type": "int",
355-
"defaultValue": 30
356-
},
357-
"gptvisionDeploymentName": {
358-
"type": "string",
359-
"defaultValue": "gpt-4-vision"
360-
},
361-
"gptvisionModelName": {
362-
"type": "string",
363-
"defaultValue": "gpt-4"
364-
},
365-
"gptvisionApiVersion": {
366-
"type": "string",
367-
"defaultValue": "2023-12-01-preview"
368-
},
369-
"gptvisionModelVersion": {
370-
"type": "string",
371-
"defaultValue": "vision-preview"
372-
},
373294
"speechServiceSkuName": {
374295
"type": "string",
375296
"defaultValue": "S0"
@@ -408,7 +329,6 @@
408329
"variables": {
409330
"openai_name": "[toLower(format('{0}-aillm-{1}', parameters('name'), parameters('resourceToken')))]",
410331
"openai_dalle_name": "[toLower(format('{0}-aidalle-{1}', parameters('name'), parameters('resourceToken')))]",
411-
"openai_gpt_vision_name": "[toLower(format('{0}-aivision-{1}', parameters('name'), parameters('resourceToken')))]",
412332
"form_recognizer_name": "[toLower(format('{0}-form-{1}', parameters('name'), parameters('resourceToken')))]",
413333
"speech_service_name": "[toLower(format('{0}-speech-{1}', parameters('name'), parameters('resourceToken')))]",
414334
"cosmos_name": "[toLower(format('{0}-cosmos-{1}', parameters('name'), parameters('resourceToken')))]",
@@ -435,7 +355,7 @@
435355
"version": "[parameters('chatGptModelVersion')]"
436356
},
437357
"sku": {
438-
"name": "Standard",
358+
"name": "GlobalStandard",
439359
"capacity": "[parameters('chatGptDeploymentCapacity')]"
440360
}
441361
},
@@ -479,19 +399,6 @@
479399
"[resourceId('Microsoft.Web/sites', variables('webapp_name'))]"
480400
]
481401
},
482-
{
483-
"type": "Microsoft.KeyVault/vaults/secrets",
484-
"apiVersion": "2021-06-01-preview",
485-
"name": "[format('{0}/{1}', variables('keyVaultName'), 'AZURE-OPENAI-VISION-API-KEY')]",
486-
"properties": {
487-
"contentType": "text/plain",
488-
"value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('openai_gpt_vision_name')), '2023-05-01').key1]"
489-
},
490-
"dependsOn": [
491-
"[resourceId('Microsoft.CognitiveServices/accounts', variables('openai_gpt_vision_name'))]",
492-
"[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]"
493-
]
494-
},
495402
{
496403
"type": "Microsoft.KeyVault/vaults/secrets",
497404
"apiVersion": "2021-06-01-preview",
@@ -613,25 +520,6 @@
613520
"[resourceId('Microsoft.CognitiveServices/accounts', variables('openai_dalle_name'))]"
614521
]
615522
},
616-
{
617-
"type": "Microsoft.CognitiveServices/accounts/deployments",
618-
"apiVersion": "2023-05-01",
619-
"name": "[format('{0}/{1}', variables('openai_gpt_vision_name'), parameters('gptvisionDeploymentName'))]",
620-
"properties": {
621-
"model": {
622-
"format": "OpenAI",
623-
"name": "[parameters('gptvisionModelName')]",
624-
"version": "[parameters('gptvisionModelVersion')]"
625-
}
626-
},
627-
"sku": {
628-
"name": "Standard",
629-
"capacity": "[parameters('gptvisionDeploymentCapacity')]"
630-
},
631-
"dependsOn": [
632-
"[resourceId('Microsoft.CognitiveServices/accounts', variables('openai_gpt_vision_name'))]"
633-
]
634-
},
635523
{
636524
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
637525
"apiVersion": "2022-05-01",
@@ -693,22 +581,6 @@
693581
"name": "SCM_DO_BUILD_DURING_DEPLOYMENT",
694582
"value": "true"
695583
},
696-
{
697-
"name": "AZURE_OPENAI_VISION_API_KEY",
698-
"value": "[format('@Microsoft.KeyVault(VaultName={0};SecretName={1})', variables('keyVaultName'), 'AZURE-OPENAI-VISION-API-KEY')]"
699-
},
700-
{
701-
"name": "AZURE_OPENAI_VISION_API_INSTANCE_NAME",
702-
"value": "[variables('openai_gpt_vision_name')]"
703-
},
704-
{
705-
"name": "AZURE_OPENAI_VISION_API_DEPLOYMENT_NAME",
706-
"value": "[parameters('gptvisionDeploymentName')]"
707-
},
708-
{
709-
"name": "AZURE_OPENAI_VISION_API_VERSION",
710-
"value": "[parameters('gptvisionApiVersion')]"
711-
},
712584
{
713585
"name": "AZURE_OPENAI_API_KEY",
714586
"value": "[format('@Microsoft.KeyVault(VaultName={0};SecretName={1})', variables('keyVaultName'), 'AZURE-OPENAI-API-KEY')]"
@@ -809,7 +681,6 @@
809681
"[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-DOCUMENT-INTELLIGENCE-KEY')]",
810682
"[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-OPENAI-API-KEY')]",
811683
"[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-OPENAI-DALLE-API-KEY')]",
812-
"[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-OPENAI-VISION-API-KEY')]",
813684
"[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-SEARCH-API-KEY')]",
814685
"[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-SPEECH-KEY')]",
815686
"[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), 'AZURE-STORAGE-ACCOUNT-KEY')]",
@@ -1024,21 +895,6 @@
1024895
"name": "[parameters('openAiSkuName')]"
1025896
}
1026897
},
1027-
{
1028-
"type": "Microsoft.CognitiveServices/accounts",
1029-
"apiVersion": "2023-05-01",
1030-
"name": "[variables('openai_gpt_vision_name')]",
1031-
"location": "[parameters('gptvisionLocation')]",
1032-
"tags": "[parameters('tags')]",
1033-
"kind": "OpenAI",
1034-
"properties": {
1035-
"customSubDomainName": "[variables('openai_gpt_vision_name')]",
1036-
"publicNetworkAccess": "Enabled"
1037-
},
1038-
"sku": {
1039-
"name": "[parameters('openAiSkuName')]"
1040-
}
1041-
},
1042898
{
1043899
"type": "Microsoft.CognitiveServices/accounts",
1044900
"apiVersion": "2023-05-01",

0 commit comments

Comments
 (0)