-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cognitive Services - Azure AI Content Safety] GA Restful API (#25498)
* Add ga contract for Content Safety * Update examples for 2023-10-01 * Resolve ModelValidation SpellCheck and Avocado * Fix typo * Fix minor errors in example and readme * Fix example * remove the 0430 content * update readme * re-format markdowm * Fix example * update blocklist example * Add eight severity levels
- Loading branch information
1 parent
06c862b
commit 4f3d1d0
Showing
28 changed files
with
1,546 additions
and
204 deletions.
There are no files selected for viewing
34 changes: 0 additions & 34 deletions
34
specification/cognitiveservices/ContentSafety/examples/2023-04-30-preview/AnalyzeImage.json
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
specification/cognitiveservices/ContentSafety/examples/2023-04-30-preview/AnalyzeText.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
specification/cognitiveservices/ContentSafety/examples/2023-10-01/AnalyzeImage.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"title": "Analyze Image", | ||
"operationId": "ImageOperations_AnalyzeImage", | ||
"parameters": { | ||
"api-version": "2023-10-01", | ||
"body": { | ||
"image": { | ||
"content": "Y29udGVudDE=" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"categoriesAnalysis": [ | ||
{ | ||
"category": "Hate", | ||
"severity": 0 | ||
}, | ||
{ | ||
"category": "SelfHarm", | ||
"severity": 0 | ||
}, | ||
{ | ||
"category": "Sexual", | ||
"severity": 0 | ||
}, | ||
{ | ||
"category": "Violence", | ||
"severity": 2 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
specification/cognitiveservices/ContentSafety/examples/2023-10-01/AnalyzeText.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"title": "Analyze Text", | ||
"operationId": "TextOperations_AnalyzeText", | ||
"parameters": { | ||
"api-version": "2023-10-01", | ||
"body": { | ||
"text": "This is text example" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"blocklistsMatch": [], | ||
"categoriesAnalysis": [ | ||
{ | ||
"category": "Hate", | ||
"severity": 0 | ||
}, | ||
{ | ||
"category": "SelfHarm", | ||
"severity": 0 | ||
}, | ||
{ | ||
"category": "Sexual", | ||
"severity": 0 | ||
}, | ||
{ | ||
"category": "Violence", | ||
"severity": 0 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...3-04-30-preview/GetTextBlocklistItem.json → ...ples/2023-10-01/GetTextBlocklistItem.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
.../2023-04-30-preview/RemoveBlockItems.json → ...ples/2023-10-01/RemoveBlocklistItems.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.