Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add private preview versions to azure-ai-content-safety feature branch #27352

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"title": "Add or Update BlocklistItems To Text Blocklist",
"operationId": "TextBlocklists_AddOrUpdateBlocklistItems",
"parameters": {
"api-version": "2023-12-30-preview",
"blocklistName": "TestBlocklist",
"body": {
"blocklistItems": [
{
"blocklistItemId": null,
"description": "Hate word",
"text": "hate"
}
]
}
},
"responses": {
"200": {
"body": {
"blocklistItems": [
{
"blocklistItemId": "9511969e-f1e3-4604-9127-05ee16c509ec",
"description": "Hate word",
"text": "hate"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"title": "Analyze Image",
"operationId": "ImageOperations_AnalyzeImage",
"parameters": {
"api-version": "2023-12-30-preview",
"body": {
"image": {
"content": "Y29udGVudDE="
}
}
},
"responses": {
"200": {
"body": {
"categoriesAnalysis": [
{
"category": "Hate",
"severity": 0
},
{
"category": "SelfHarm",
"severity": 0
},
{
"category": "Sexual",
"severity": 0
},
{
"category": "Violence",
"severity": 2
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{

Check failure on line 1 in specification/cognitiveservices/ContentSafety/examples/2023-10-30-preview/AnalyzeText.json

View check run for this annotation

Azure Pipelines / Swagger PrettierCheck

specification/cognitiveservices/ContentSafety/examples/2023-10-30-preview/AnalyzeText.json#L1

specification/cognitiveservices/ContentSafety/examples/2023-10-30-preview/AnalyzeText.json(1,1): error : Code style issues found, please run prettier. > npm install > npx prettier --write specification/cognitiveservices/ContentSafety/examples/2023-10-30-preview/AnalyzeText.json
"title": "Analyze Text",
"operationId": "TextOperations_AnalyzeText",
"parameters": {
"api-version": "2023-12-30-preview",
"body": {
"text": "This is text example. A hate speech sentence. A sentence with a violent description."
}
},
"responses": {
"200": {
"body": {
"blocklistsMatch": [],
"categoriesAnalysis": [{
"category": "Hate",
"severity": 0
},
{
"category": "SelfHarm",
"severity": 0
},
{
"category": "Sexual",
"severity": 0
},
{
"category": "Violence",
"severity": 0
}
],
"citation": [
"A hate speech sentence",
"A sentence with a violent description"
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"title": "Create Or Update Text Blocklist",
"operationId": "TextBlocklists_CreateOrUpdateTextBlocklist",
"parameters": {
"api-version": "2023-12-30-preview",
"blocklistName": "TestBlocklist",
"resource": {
"description": "Test Blocklist"
}
},
"responses": {
"200": {
"body": {
"blocklistName": "TestBlocklist",
"description": "Test Blocklist"
}
},
"201": {
"body": {
"blocklistName": "TestBlocklist",
"description": "Test Blocklist"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"title": "Delete Text Blocklist By blocklistName",
"operationId": "TextBlocklists_DeleteTextBlocklist",
"parameters": {
"api-version": "2023-12-30-preview",
"blocklistName": "TestBlocklist"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"title": "Get Text Blocklist By blocklistName",
"operationId": "TextBlocklists_GetTextBlocklist",
"parameters": {
"api-version": "2023-12-30-preview",
"blocklistName": "TestBlocklist"
},
"responses": {
"200": {
"body": {
"blocklistName": "TestBlocklist",
"description": "Test Blocklist"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"title": "Get BlockItem By blocklistName And blocklistItemId",
"operationId": "TextBlocklists_GetTextBlocklistItem",
"parameters": {
"api-version": "2023-12-30-preview",
"blocklistName": "TestBlocklist",
"blocklistItemId": "9511969e-f1e3-4604-9127-05ee16c509ec"
},
"responses": {
"200": {
"body": {
"blocklistItemId": "9511969e-f1e3-4604-9127-05ee16c509ec",
"description": "Hate word",
"text": "hate"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"title": "Get All BlockItems By blocklistName",
"operationId": "TextBlocklists_ListTextBlocklistItems",
"parameters": {
"api-version": "2023-12-30-preview",
"blocklistName": "TestBlocklist"
},
"responses": {
"200": {
"body": {
"value": [
{
"blocklistItemId": "9511969e-f1e3-4604-9127-05ee16c509ec",
"description": "Hate word",
"text": "hate"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"title": "Get All Text Blocklists",
"operationId": "TextBlocklists_ListTextBlocklists",
"parameters": {
"api-version": "2023-12-30-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"blocklistName": "TestBlocklist",
"description": "Test Blocklist"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"title": "Remove BlockItems From Text Blocklist",
"operationId": "TextBlocklists_RemoveBlocklistItems",
"parameters": {
"api-version": "2023-12-30-preview",
"blocklistName": "TestBlocklist",
"body": {
"blocklistItemIds": [
"9511969e-f1e3-4604-9127-05ee16c509ec"
]
}
},
"responses": {
"204": {}
}
}
6 changes: 6 additions & 0 deletions specification/cognitiveservices/ContentSafety/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,10 @@ enum Versions {

@useDependency(Azure.Core.Versions.v1_0_Preview_2)
v2023_10_15_Preview: "2023-10-15-preview",

@useDependency(Azure.Core.Versions.v1_0_Preview_2)
v2023_10_30_Preview: "2023-10-30-preview",

@useDependency(Azure.Core.Versions.v1_0_Preview_2)
v2024_01_30_Preview: "2024-01-30-preview",
}
Loading
Loading