Skip to content

Commit

Permalink
fix old versions RAI content filters
Browse files Browse the repository at this point in the history
  • Loading branch information
tianxin-ms committed Jun 7, 2024
1 parent 37aae7c commit 9d3087f
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5631,16 +5631,25 @@
"description": "Azure OpenAI Content Filter.",
"type": "object",
"properties": {
"name": {
"policyName": {
"type": "string",
"description": "Name of Content Filter."
},
"isMultiLevelFilter": {
"type": "boolean",
"description": "If the Content Filter has multi severity levels(Low, Medium, or High)."
"description": {
"type": "string",
"description": "Description of Content Filter."
},
"source": {
"$ref": "#/definitions/RaiPolicyContentSource"
"filterType": {
"type": "string",
"description": "Content Filter type.",
"enum": [
"MultiLevel",
"Switch"
],
"x-ms-enum": {
"name": "RaiContentFilterType",
"modelAsString": true
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,19 @@
"body": {
"value": [
{
"name": "Hate",
"isMultiLevelFilter": true
"policyName": "Hate",
"description": "Multi-level filter for hate speech.",
"filterType": "MultiLevel"
},
{
"name": "Sexual",
"isMultiLevelFilter": true
"policyName": "Sexual",
"description": "Multi-level filter for sexual content.",
"filterType": "MultiLevel"
},
{
"name": "Violence",
"isMultiLevelFilter": true
},
{
"name": "Selfharm",
"isMultiLevelFilter": true
},
{
"name": "Jailbreak",
"isMultiLevelFilter": false,
"source": "Prompt"
},
{
"name": "Protected Material Text",
"isMultiLevelFilter": false,
"source": "Completion"
},
{
"name": "Protected Material Code",
"isMultiLevelFilter": false,
"source": "Completion"
},
{
"name": "Profanity",
"isMultiLevelFilter": false
},
{
"name": "Indirect Attack",
"isMultiLevelFilter": false,
"source": "Prompt"
"policyName": "HateSpeechPatterns",
"description": "Global blocklist for hate speech.",
"filterType": "Switch"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6292,16 +6292,25 @@
"description": "Azure OpenAI Content Filter.",
"type": "object",
"properties": {
"name": {
"policyName": {
"type": "string",
"description": "Name of Content Filter."
},
"isMultiLevelFilter": {
"type": "boolean",
"description": "If the Content Filter has multi severity levels(Low, Medium, or High)."
"description": {
"type": "string",
"description": "Description of Content Filter."
},
"source": {
"$ref": "#/definitions/RaiPolicyContentSource"
"filterType": {
"type": "string",
"description": "Content Filter type.",
"enum": [
"MultiLevel",
"Switch"
],
"x-ms-enum": {
"name": "RaiContentFilterType",
"modelAsString": true
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,19 @@
"body": {
"value": [
{
"name": "Hate",
"isMultiLevelFilter": true
"policyName": "Hate",
"description": "Multi-level filter for hate speech.",
"filterType": "MultiLevel"
},
{
"name": "Sexual",
"isMultiLevelFilter": true
"policyName": "Sexual",
"description": "Multi-level filter for sexual content.",
"filterType": "MultiLevel"
},
{
"name": "Violence",
"isMultiLevelFilter": true
},
{
"name": "Selfharm",
"isMultiLevelFilter": true
},
{
"name": "Jailbreak",
"isMultiLevelFilter": false,
"source": "Prompt"
},
{
"name": "Protected Material Text",
"isMultiLevelFilter": false,
"source": "Completion"
},
{
"name": "Protected Material Code",
"isMultiLevelFilter": false,
"source": "Completion"
},
{
"name": "Profanity",
"isMultiLevelFilter": false
},
{
"name": "Indirect Attack",
"isMultiLevelFilter": false,
"source": "Prompt"
"policyName": "HateSpeechPatterns",
"description": "Global blocklist for hate speech.",
"filterType": "Switch"
}
]
}
Expand Down

0 comments on commit 9d3087f

Please sign in to comment.