Skip to content

Commit 64e9954

Browse files
Update custom-policy-model-deployment.md
1 parent 47cbb30 commit 64e9954

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

articles/ai-studio/how-to/custom-policy-model-deployment.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,35 +39,35 @@ When using models from Azure AI services and Azure OpenAI with Azure AI Studio,
3939
4040
```json
4141
{
42-
"mode": "All",
43-
"policyRule": {
42+
"mode": "All",
43+
"policyRule": {
4444
"if": {
45-
"allOf": [
45+
"allOf": [
4646
{
47-
"field": "type",
48-
"equals": "Microsoft.CognitiveServices/accounts/deployments"
47+
"field": "type",
48+
"equals": "Microsoft.CognitiveServices/accounts/deployments"
4949
},
5050
{
51-
"not": {
52-
"field": "Microsoft.CognitiveServices/accounts/deployments/model.name",
51+
"not": {
52+
"value": "[concat(field('Microsoft.CognitiveServices/accounts/deployments/model.name'), ',', field('Microsoft.CognitiveServices/accounts/deployments/model.version'))]",
5353
"in": "[parameters('allowedModels')]"
54+
}
5455
}
55-
}
56-
]
56+
]
5757
},
5858
"then": {
59-
"effect": "deny"
59+
"effect": "deny"
6060
}
61-
},
62-
"parameters": {
61+
},
62+
"parameters": {
6363
"allowedModels": {
64-
"type": "Array",
65-
"metadata": {
66-
"description": "The list of allowed models to be deployed.",
67-
"displayName": "Allowed models"
68-
}
64+
"type": "Array",
65+
"metadata": {
66+
"displayName": "Allowed AI models",
67+
"description": "The list of allowed models to be deployed."
68+
}
6969
}
70-
}
70+
}
7171
}
7272
```
7373

@@ -76,15 +76,15 @@ When using models from Azure AI services and Azure OpenAI with Azure AI Studio,
7676
1. From the **Assign policy** page, use the following values on the **Basics** tab:
7777

7878
- **Scope**: Select the scope where you want to assign the policy. The scope can be a management group, subscription, or resource group.
79-
- **Policy definition**: This field is prepopulated with the policy definition you created.
79+
- **Policy definition**: This field is prepopulated with the title of policy definition you created previously.
8080
- **Assignment name**: Enter a unique name for the assignment.
8181
- **Policy enforcement**: Make sure that the **Policy enforcement** field is set to **Enabled**. If it isn't enabled, the policy isn't enforced.
8282

8383
Select **Next** at the bottom of the page, or the **Parameters** tab at the top of the page.
84-
1. From the **Parameters** tab, set **Allowed models** to the list of models that you want to allow. The list should be a comma-separated list of model names, surrounded by square brackets. For example, `["gpt-4", "gpt-35-turbo"]`.
84+
1. From the **Parameters** tab, set **Allowed AI models** to the list of models that you want to allow. The list should be a comma-separated list of model names and approved versions, surrounded by square brackets. For example, `["gpt-4,0613", "gpt-35-turbo,0613"]`.
8585

8686
> [!TIP]
87-
> You can find the model names in the [Azure AI Studio Model Catalog](https://ai.azure.com/explore/models). Select the model to view the details, and then copy the model name in the title.
87+
> You can find the model names and their versions in the [Azure AI Studio Model Catalog](https://ai.azure.com/explore/models). Select the model to view the details, and then copy the model name and their version in the title.
8888

8989
1. Optionally, select the **Non-compliance messages** tab at the top of the page and set a custom message for noncompliance.
9090
1. Select **Review + create** tab and verify that the policy assignment is correct. When ready, select **Create** to assign the policy.

0 commit comments

Comments
 (0)