Skip to content

Commit 1025493

Browse files
committed
update api term
1 parent a1b3a02 commit 1025493

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,12 @@ try:
300300

301301
except openai.error.InvalidRequestError as e:
302302
if e.error.code == "content_filter" and e.error.innererror:
303-
content_filter_result = e.error.innererror.content_filter_result
303+
content_filter_results = e.error.innererror.content_filter_results
304304
# print the formatted JSON
305-
print(content_filter_result)
305+
print(content_filter_results)
306306

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

311311
```
@@ -469,7 +469,7 @@ Blocks completion content when ungrounded completion content was detected.
469469
"status": 400,
470470
"innererror": {
471471
"code": "ResponsibleAIPolicyViolation",
472-
"content_filter_result": {
472+
"content_filter_results": {
473473
"hate": {
474474
"filtered": true,
475475
"severity": "high"

0 commit comments

Comments
 (0)