Skip to content

Commit df34995

Browse files
authored
Align optionality of content filter categories (#24819)
1 parent 0c958e3 commit df34995

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

specification/cognitiveservices/OpenAI.Inference/models/completions.common.tsp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ model ContentFilterResults {
9898
those portrayed as an assault or a forced sexual violent act against one’s will,
9999
prostitution, pornography, and abuse.
100100
""")
101-
sexual: ContentFilterResult;
101+
sexual?: ContentFilterResult;
102102

103103
@doc("""
104104
Describes language related to physical actions intended to hurt, injure, damage, or
105105
kill someone or something; describes weapons, etc.
106106
""")
107-
violence: ContentFilterResult;
107+
violence?: ContentFilterResult;
108108

109109
@doc("""
110110
Describes language attacks or uses that include pejorative or discriminatory language
@@ -113,14 +113,14 @@ model ContentFilterResults {
113113
gender identity and expression, sexual orientation, religion, immigration status, ability
114114
status, personal appearance, and body size.
115115
""")
116-
hate: ContentFilterResult;
116+
hate?: ContentFilterResult;
117117

118118
@doc("""
119119
Describes language related to physical actions intended to purposely hurt, injure,
120120
or damage one’s body, or kill oneself.
121121
""")
122122
@projectedName("json", "self_harm")
123-
selfHarm: ContentFilterResult;
123+
selfHarm?: ContentFilterResult;
124124
}
125125

126126
@added(ServiceApiVersions.v2023_06_01_Preview)

specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-06-01-preview/generated.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -972,13 +972,7 @@
972972
"description": "Describes language related to physical actions intended to purposely hurt, injure,\nor damage one’s body, or kill oneself.",
973973
"x-ms-client-name": "selfHarm"
974974
}
975-
},
976-
"required": [
977-
"sexual",
978-
"violence",
979-
"hate",
980-
"self_harm"
981-
]
975+
}
982976
},
983977
"ContentFilterSeverity": {
984978
"type": "string",

specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-07-01-preview/generated.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,13 +1005,7 @@
10051005
"description": "Describes language related to physical actions intended to purposely hurt, injure,\nor damage one’s body, or kill oneself.",
10061006
"x-ms-client-name": "selfHarm"
10071007
}
1008-
},
1009-
"required": [
1010-
"sexual",
1011-
"violence",
1012-
"hate",
1013-
"self_harm"
1014-
]
1008+
}
10151009
},
10161010
"ContentFilterSeverity": {
10171011
"type": "string",

0 commit comments

Comments
 (0)