Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,377 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to launch an openAI resource and when it finishes launching a gpt-4 template, but I get the following error:
The 'properties' field is invalid, error: 'Error converting value "gpt-4" to type 'Microsoft.CognitiveServices.ResourceProvider.Contracts.ServiceModel'. Path 'model'.'.
If I change to gpt-3, gpt-4o I get the same error.
Template:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.CognitiveServices/accounts",
"apiVersion": "2022-12-01",
"name": "[parameters('openAIName')]",
"location": "[parameters('location')]",
"kind": "OpenAI",
"sku": {
"name": "S0"
},
"properties": {
"customSubDomainName": "[parameters('openAIDomain')]",
"publicNetworkAccess": "Enabled"
},
"resources": [
{
"type": "deployments",
"apiVersion": "2021-10-01",
"name": "gpt4-deployment",
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', parameters('openAIName'))]"
],
"properties": {
"model": "gpt-4",
"deploymentName": "[parameters('deploymentName')]",
"modelVersion": "4",
"scaleSettings": {
"scaleType": "Standard"
}
}
}
]
}
],
"parameters": {
"openAIName": {
"type": "string"
},
"location": {
"type": "string",
"defaultValue": "eastus"
},
"openAIDomain": {
"type": "string",
"metadata": {
"description": "Custom subdomain name for the OpenAI service."
}
},
"deploymentName": {
"type": "string",
"defaultValue": "gpt4-deployment",
"metadata": {
"description": "Name for the GPT-4 model deployment."
}
}
},
"outputs": {
"openAIEndpoint": {
"type": "string",
"value": "[reference(parameters('openAIName')).properties.endpoint]"
},
"openAIKey": {
"type": "string",
"value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', parameters('openAIName')), '2021-10-01').key1]"
}
}
}
Here is the template to solve this:
{
"type": "Microsoft.CognitiveServices/accounts",
"apiVersion": "2024-06-01-preview",
"name": "[parameters('openAIName')]",
"location": "[parameters('location')]",
"sku": {
"name": "[parameters('skuOpenAI')]"
},
"kind": "OpenAI",
"properties": {
"customSubDomainName": "[parameters('openAIDomain')]",
"publicNetworkAccess": "Enabled"
}
},
{
"type": "Microsoft.CognitiveServices/accounts/deployments",
"apiVersion": "2024-06-01-preview",
"name": "[concat(parameters('openAIName'), '/gpt-4')]",
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', parameters('openAIName'))]"
],
"sku": {
"name": "GlobalStandard",
"capacity": 8
},
"properties": {
"model": {
"format": "OpenAI",
"name": "gpt-4",
"version": "turbo-2024-04-09"
},
"versionUpgradeOption": "OnceNewDefaultVersionAvailable",
"currentCapacity": 8
}
},