Skip to content

Commit a6bfa62

Browse files
authored
Cognitive Services 2024-06-01-preview (#29228)
* Copy files from preview/2024-04-01-preview Copied the files in a separate commit. This allows reviewers to easily diff subsequent changes against the previous spec. * Update version to preview/2024-06-01-preview Updated the API version from preview/2024-04-01-preview to preview/2024-06-01-preview. * Added tag for 2024-06-01-preview in readme file * RAI API changes * fix check errors * fix old versions RAI content filters * Revert "fix old versions RAI content filters" This reverts commit 9d3087f. * Add "description" * Add CalculateModelCapacity API * fix Swagger LintDiff * fix * reverted changes of old API version * address comments * fix lint error * Updated ModelCapacityCalculatorWorkload * Address comments * fix Mode Validation * fix linter * address comments * fix swagger lint errors
1 parent c2dff09 commit a6bfa62

File tree

85 files changed

+12677
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+12677
-67
lines changed

specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2023-10-01-preview/examples/GetRaiPolicy.json

Lines changed: 71 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,88 @@
1414
"name": "raiPolicyName",
1515
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/raiPolicies/raiPolicyName",
1616
"properties": {
17-
"basePolicyName": "112",
17+
"basePolicyName": "Microsoft.Default",
18+
"mode": "Deferred",
1819
"contentFilters": [
1920
{
2021
"name": "hate",
21-
"allowedContentLevel": "Low",
22-
"blocking": true
22+
"blocking": false,
23+
"enabled": false,
24+
"allowedContentLevel": "High",
25+
"source": "Prompt"
26+
},
27+
{
28+
"name": "hate",
29+
"blocking": true,
30+
"enabled": true,
31+
"allowedContentLevel": "Medium",
32+
"source": "Completion"
33+
},
34+
{
35+
"name": "sexual",
36+
"blocking": true,
37+
"enabled": true,
38+
"allowedContentLevel": "High",
39+
"source": "Prompt"
2340
},
2441
{
2542
"name": "sexual",
26-
"allowedContentLevel": "Low"
43+
"blocking": true,
44+
"enabled": true,
45+
"allowedContentLevel": "Medium",
46+
"source": "Completion"
47+
},
48+
{
49+
"name": "selfharm",
50+
"blocking": true,
51+
"enabled": true,
52+
"allowedContentLevel": "High",
53+
"source": "Prompt"
54+
},
55+
{
56+
"name": "selfharm",
57+
"blocking": true,
58+
"enabled": true,
59+
"allowedContentLevel": "Medium",
60+
"source": "Completion"
2761
},
2862
{
2963
"name": "violence",
30-
"enabled": false
64+
"blocking": true,
65+
"enabled": true,
66+
"allowedContentLevel": "Medium",
67+
"source": "Prompt"
68+
},
69+
{
70+
"name": "violence",
71+
"blocking": true,
72+
"enabled": true,
73+
"allowedContentLevel": "Medium",
74+
"source": "Completion"
75+
},
76+
{
77+
"name": "jailbreak",
78+
"blocking": true,
79+
"source": "Prompt",
80+
"enabled": true
81+
},
82+
{
83+
"name": "protected_material_text",
84+
"blocking": true,
85+
"source": "Completion",
86+
"enabled": true
87+
},
88+
{
89+
"name": "protected_material_code",
90+
"blocking": true,
91+
"source": "Completion",
92+
"enabled": true
3193
},
3294
{
33-
"name": "DefaultHateSpeechBlockList",
34-
"enabled": false
95+
"name": "profanity",
96+
"blocking": true,
97+
"source": "Prompt",
98+
"enabled": true
3599
}
36100
]
37101
}

specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2023-10-01-preview/examples/ListRaiPolicies.json

Lines changed: 71 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,88 @@
1313
"name": "raiPolicyName",
1414
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/raiPolicies/raiPolicyName",
1515
"properties": {
16-
"basePolicyName": "112",
16+
"basePolicyName": "Microsoft.Default",
17+
"mode": "Deferred",
1718
"contentFilters": [
1819
{
1920
"name": "hate",
20-
"allowedContentLevel": "Low",
21-
"blocking": true
21+
"blocking": false,
22+
"enabled": false,
23+
"allowedContentLevel": "High",
24+
"source": "Prompt"
25+
},
26+
{
27+
"name": "hate",
28+
"blocking": true,
29+
"enabled": true,
30+
"allowedContentLevel": "Medium",
31+
"source": "Completion"
32+
},
33+
{
34+
"name": "sexual",
35+
"blocking": true,
36+
"enabled": true,
37+
"allowedContentLevel": "High",
38+
"source": "Prompt"
2239
},
2340
{
2441
"name": "sexual",
25-
"allowedContentLevel": "Low"
42+
"blocking": true,
43+
"enabled": true,
44+
"allowedContentLevel": "Medium",
45+
"source": "Completion"
46+
},
47+
{
48+
"name": "selfharm",
49+
"blocking": true,
50+
"enabled": true,
51+
"allowedContentLevel": "High",
52+
"source": "Prompt"
53+
},
54+
{
55+
"name": "selfharm",
56+
"blocking": true,
57+
"enabled": true,
58+
"allowedContentLevel": "Medium",
59+
"source": "Completion"
2660
},
2761
{
2862
"name": "violence",
29-
"enabled": false
63+
"blocking": true,
64+
"enabled": true,
65+
"allowedContentLevel": "Medium",
66+
"source": "Prompt"
67+
},
68+
{
69+
"name": "violence",
70+
"blocking": true,
71+
"enabled": true,
72+
"allowedContentLevel": "Medium",
73+
"source": "Completion"
74+
},
75+
{
76+
"name": "jailbreak",
77+
"blocking": true,
78+
"source": "Prompt",
79+
"enabled": true
80+
},
81+
{
82+
"name": "protected_material_text",
83+
"blocking": true,
84+
"source": "Completion",
85+
"enabled": true
86+
},
87+
{
88+
"name": "protected_material_code",
89+
"blocking": true,
90+
"source": "Completion",
91+
"enabled": true
3092
},
3193
{
32-
"name": "DefaultHateSpeechBlockList",
33-
"enabled": false
94+
"name": "profanity",
95+
"blocking": true,
96+
"source": "Prompt",
97+
"enabled": true
3498
}
3599
]
36100
}

specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2023-10-01-preview/examples/PutRaiPolicy.json

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"raiPolicyName": "raiPolicyName",
88
"raiPolicy": {
99
"properties": {
10-
"basePolicyName": "112",
10+
"basePolicyName": "Microsoft.Default",
11+
"mode": "Deferred",
1112
"contentFilters": [
1213
{
1314
"name": "hate",
@@ -88,12 +89,6 @@
8889
"blocking": true,
8990
"source": "Prompt",
9091
"enabled": true
91-
},
92-
{
93-
"name": "profanity",
94-
"blocking": true,
95-
"source": "Completion",
96-
"enabled": true
9792
}
9893
]
9994
}
@@ -106,6 +101,7 @@
106101
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/raiPolicies/raiPolicyName",
107102
"properties": {
108103
"basePolicyName": "Microsoft.Default",
104+
"mode": "Deferred",
109105
"contentFilters": [
110106
{
111107
"name": "hate",
@@ -186,12 +182,6 @@
186182
"blocking": true,
187183
"source": "Prompt",
188184
"enabled": true
189-
},
190-
{
191-
"name": "profanity",
192-
"blocking": true,
193-
"source": "Completion",
194-
"enabled": true
195185
}
196186
]
197187
}
@@ -203,6 +193,7 @@
203193
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/raiPolicies/raiPolicyName",
204194
"properties": {
205195
"basePolicyName": "Microsoft.Default",
196+
"mode": "Deferred",
206197
"contentFilters": [
207198
{
208199
"name": "hate",
@@ -283,12 +274,6 @@
283274
"blocking": true,
284275
"source": "Prompt",
285276
"enabled": true
286-
},
287-
{
288-
"name": "profanity",
289-
"blocking": true,
290-
"source": "Completion",
291-
"enabled": true
292277
}
293278
]
294279
}

specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2024-04-01-preview/examples/GetRaiPolicy.json

Lines changed: 71 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,88 @@
1414
"name": "raiPolicyName",
1515
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/raiPolicies/raiPolicyName",
1616
"properties": {
17-
"basePolicyName": "112",
17+
"basePolicyName": "Microsoft.Default",
18+
"mode": "Deferred",
1819
"contentFilters": [
1920
{
2021
"name": "hate",
21-
"allowedContentLevel": "Low",
22-
"blocking": true
22+
"blocking": false,
23+
"enabled": false,
24+
"allowedContentLevel": "High",
25+
"source": "Prompt"
26+
},
27+
{
28+
"name": "hate",
29+
"blocking": true,
30+
"enabled": true,
31+
"allowedContentLevel": "Medium",
32+
"source": "Completion"
33+
},
34+
{
35+
"name": "sexual",
36+
"blocking": true,
37+
"enabled": true,
38+
"allowedContentLevel": "High",
39+
"source": "Prompt"
2340
},
2441
{
2542
"name": "sexual",
26-
"allowedContentLevel": "Low"
43+
"blocking": true,
44+
"enabled": true,
45+
"allowedContentLevel": "Medium",
46+
"source": "Completion"
47+
},
48+
{
49+
"name": "selfharm",
50+
"blocking": true,
51+
"enabled": true,
52+
"allowedContentLevel": "High",
53+
"source": "Prompt"
54+
},
55+
{
56+
"name": "selfharm",
57+
"blocking": true,
58+
"enabled": true,
59+
"allowedContentLevel": "Medium",
60+
"source": "Completion"
2761
},
2862
{
2963
"name": "violence",
30-
"enabled": false
64+
"blocking": true,
65+
"enabled": true,
66+
"allowedContentLevel": "Medium",
67+
"source": "Prompt"
68+
},
69+
{
70+
"name": "violence",
71+
"blocking": true,
72+
"enabled": true,
73+
"allowedContentLevel": "Medium",
74+
"source": "Completion"
75+
},
76+
{
77+
"name": "jailbreak",
78+
"blocking": true,
79+
"source": "Prompt",
80+
"enabled": true
81+
},
82+
{
83+
"name": "protected_material_text",
84+
"blocking": true,
85+
"source": "Completion",
86+
"enabled": true
87+
},
88+
{
89+
"name": "protected_material_code",
90+
"blocking": true,
91+
"source": "Completion",
92+
"enabled": true
3193
},
3294
{
33-
"name": "DefaultHateSpeechBlockList",
34-
"enabled": false
95+
"name": "profanity",
96+
"blocking": true,
97+
"source": "Prompt",
98+
"enabled": true
3599
}
36100
]
37101
}

0 commit comments

Comments
 (0)