File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
articles/ai-services/openai/concepts Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -300,12 +300,12 @@ try:
300
300
301
301
except openai.error.InvalidRequestError as e:
302
302
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
304
304
# print the formatted JSON
305
- print (content_filter_result )
305
+ print (content_filter_results )
306
306
307
307
# 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():
309
309
print (f " { category} : \n filtered= { details[' filtered' ]} \n severity= { details[' severity' ]} " )
310
310
311
311
```
@@ -469,7 +469,7 @@ Blocks completion content when ungrounded completion content was detected.
469
469
"status": 400,
470
470
"innererror": {
471
471
"code": "ResponsibleAIPolicyViolation",
472
- "content_filter_result ": {
472
+ "content_filter_results ": {
473
473
"hate": {
474
474
"filtered": true,
475
475
"severity": "high"
You can’t perform that action at this time.
0 commit comments