Skip to content

Commit c8fa94e

Browse files
committed
update term
1 parent a5edc47 commit c8fa94e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

articles/ai-services/openai/concepts/content-filter.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ The table below outlines the various ways content filtering can appear:
272272

273273
**HTTP Response Code** | **Response behavior**
274274
|------------------------|----------------------|
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.|
276276

277277
**Example request payload:**
278278

@@ -298,7 +298,7 @@ The table below outlines the various ways content filtering can appear:
298298
"index": 0,
299299
"finish_reason": "length",
300300
"logprobs": null,
301-
"content_filter_result": {
301+
"content_filter_results": {
302302
"error": {
303303
"code": "content_filter_error",
304304
"message": "The contents are not filtered"
@@ -594,12 +594,12 @@ try:
594594

595595
except openai.error.InvalidRequestError as e:
596596
if e.error.code == "content_filter" and e.error.innererror:
597-
content_filter_result = e.error.innererror.content_filter_result
597+
content_filter_results = e.error.innererror.content_filter_result
598598
# print the formatted JSON
599-
print(content_filter_result)
599+
print(content_filter_results)
600600

601601
# or access the individual categories and details
602-
for category, details in content_filter_result.items():
602+
for category, details in content_filter_results.items():
603603
print(f"{category}:\n filtered={details['filtered']}\n severity={details['severity']}")
604604

605605
```
@@ -762,7 +762,7 @@ Blocks completion content when ungrounded completion content was detected.
762762
"status": 400,
763763
"innererror": {
764764
"code": "ResponsibleAIPolicyViolation",
765-
"content_filter_result": {
765+
"content_filter_results": {
766766
"hate": {
767767
"filtered": true,
768768
"severity": "high"
@@ -1039,7 +1039,7 @@ As part of your application design, consider the following best practices to del
10391039
10401040
- 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.
10411041
- 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).
10431043
- 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.
10441044
10451045
## Next steps

articles/ai-services/openai/how-to/use-blocklists.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ In the below example, a GPT-35-Turbo deployment with a blocklist is blocking the
149149
"status": 400,
150150
"innererror": {
151151
"code": "ResponsibleAIPolicyViolation",
152-
"content_filter_result": {
152+
"content_filter_results": {
153153
"custom_blocklists": [
154154
{
155155
"filtered": true,

articles/ai-services/openai/includes/language-overview/python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ print(completion.model_dump_json(indent=2))
334334
"prompt_filter_results": [
335335
{
336336
"prompt_index": 0,
337-
"content_filter_result": {
337+
"content_filter_results": {
338338
"jailbreak": {
339339
"filtered": false,
340340
"detected": false
@@ -343,7 +343,7 @@ print(completion.model_dump_json(indent=2))
343343
},
344344
{
345345
"prompt_index": 1,
346-
"content_filter_result": {
346+
"content_filter_results": {
347347
"sexual": {
348348
"filtered": false,
349349
"severity": "safe"

0 commit comments

Comments
 (0)