You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/openai/concepts/content-filter.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -272,7 +272,7 @@ The table below outlines the various ways content filtering can appear:
272
272
273
273
**HTTP Response Code** | **Response behavior**
274
274
|------------------------|----------------------|
275
-
| 200 | If the content filtering system is down or otherwise unable to complete the operation in time, your request will still complete without content filtering. You can determine that the filtering wasn't applied by looking for an error message in the `content_filter_result` object.|
275
+
| 200 | If the content filtering system is down or otherwise unable to complete the operation in time, your request will still complete without content filtering. You can determine that the filtering wasn't applied by looking for an error message in the `content_filter_results` object.|
276
276
277
277
**Example request payload:**
278
278
@@ -298,7 +298,7 @@ The table below outlines the various ways content filtering can appear:
298
298
"index": 0,
299
299
"finish_reason": "length",
300
300
"logprobs": null,
301
-
"content_filter_result": {
301
+
"content_filter_results": {
302
302
"error": {
303
303
"code": "content_filter_error",
304
304
"message": "The contents are not filtered"
@@ -594,12 +594,12 @@ try:
594
594
595
595
except openai.error.InvalidRequestError as e:
596
596
if e.error.code =="content_filter"and e.error.innererror:
@@ -762,7 +762,7 @@ Blocks completion content when ungrounded completion content was detected.
762
762
"status": 400,
763
763
"innererror": {
764
764
"code": "ResponsibleAIPolicyViolation",
765
-
"content_filter_result": {
765
+
"content_filter_results": {
766
766
"hate": {
767
767
"filtered": true,
768
768
"severity": "high"
@@ -1039,7 +1039,7 @@ As part of your application design, consider the following best practices to del
1039
1039
1040
1040
- Decide how you want to handle scenarios where your users send prompts containing content that is classified at a filtered category and severity level or otherwise misuse your application.
1041
1041
- Check the `finish_reason` to see if a completion is filtered.
1042
-
- Check that there's no error object in the `content_filter_result` (indicating that content filters didn't run).
1042
+
- Check that there's no error object in the `content_filter_results` (indicating that content filters didn't run).
1043
1043
- If you're using the protected material code model in annotate mode, display the citation URL when you're displaying the code in your application.
0 commit comments