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
@@ -275,7 +275,7 @@ The table below outlines the various ways content filtering can appear:
275
275
276
276
**HTTP Response Code** | **Response behavior**
277
277
|------------------------|----------------------|
278
-
| 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.|
278
+
| 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.|
279
279
280
280
**Example request payload:**
281
281
@@ -301,7 +301,7 @@ The table below outlines the various ways content filtering can appear:
301
301
"index": 0,
302
302
"finish_reason": "length",
303
303
"logprobs": null,
304
-
"content_filter_result": {
304
+
"content_filter_results": {
305
305
"error": {
306
306
"code": "content_filter_error",
307
307
"message": "The contents are not filtered"
@@ -597,12 +597,12 @@ try:
597
597
598
598
except openai.error.InvalidRequestError as e:
599
599
if e.error.code =="content_filter"and e.error.innererror:
@@ -765,7 +765,7 @@ Blocks completion content when ungrounded completion content was detected.
765
765
"status": 400,
766
766
"innererror": {
767
767
"code": "ResponsibleAIPolicyViolation",
768
-
"content_filter_result": {
768
+
"content_filter_results": {
769
769
"hate": {
770
770
"filtered": true,
771
771
"severity": "high"
@@ -1040,7 +1040,7 @@ As part of your application design, consider the following best practices to del
1040
1040
1041
1041
- 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.
1042
1042
- Check the `finish_reason` to see if a completion is filtered.
1043
-
- Check that there's no error object in the `content_filter_result` (indicating that content filters didn't run).
1043
+
- Check that there's no error object in the `content_filter_results` (indicating that content filters didn't run).
1044
1044
- 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