Skip to content

Commit

Permalink
Add private preview versions to feature branch (#43) (Azure#27352)
Browse files Browse the repository at this point in the history
* 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

* init content safety 2023-10-15-preview

* init content safety 2023-10-15-previwe

* update

* format example

* update read me file

* update

* update

* update contract

* update

* update

* update threshold

* update new contract by add judgement kind enum

* update description

* u

* update

* updat length

* update

* update

* update description for accept severity threshodl

* update

* merge with acs-ga

* Add snippy contract

* remove 8 sev levels for image

* update contentsafety.json

* Update snippy path

* add type spec for jailbreak

* Add incident response API in 2023-10-30-preview

* compiled

* Adaptive annotation service contract

* Remove operations

* update

* update

* refine

* update

* make 0,1,2,3,4,5,6,7 to 0, 1, 2, 3, ... and add comman in last enum value

* update path

* Update NL Snippy path

* Resolve conflict

* add

* add

* remove labelName

* Fix route and minor errors

* Change typo

* update

* Update protected material API

* update project sample

* Change path name

* Update protect material contract

* update jailbreak

* Update incident contract

* Update contract

* Update

* scenarios to enumerations (#19)

* Remove project related contract (#20)

* Remove project related things

* Remove accepted

* Remove examples

* Merge 1015 (#22)

* 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

* init content safety 2023-10-15-preview

* init content safety 2023-10-15-previwe

* update

* format example

* update read me file

* update

* update

* update contract

* update

* update

* update threshold

* update new contract by add judgement kind enum

* update description

* u

* update

* updat length

* update

* update

* update description for accept severity threshodl

* update

* merge with acs-ga

* Add snippy contract

* remove 8 sev levels for image

* update contentsafety.json

* Update snippy path

* add type spec for jailbreak

* compiled

* update

* update

* refine

* update

* make 0,1,2,3,4,5,6,7 to 0, 1, 2, 3, ... and add comman in last enum value

* update path

* Update NL Snippy path

* Resolve conflict

* Update protected material API

* update project sample

* Change path name

* Update protect material contract

* update jailbreak

* Remove project related contract (#20)

* Remove project related things

* Remove accepted

* Remove examples

---------






* Add list API for Annotation Service (#23)

* 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

* init content safety 2023-10-15-preview

* init content safety 2023-10-15-previwe

* update

* format example

* update read me file

* update

* update

* update contract

* update

* update

* update threshold

* update new contract by add judgement kind enum

* update description

* u

* update

* updat length

* update

* update

* update description for accept severity threshodl

* update

* merge with acs-ga

* Add snippy contract

* remove 8 sev levels for image

* update contentsafety.json

* Update snippy path

* add type spec for jailbreak

* compiled

* update

* update

* refine

* update

* make 0,1,2,3,4,5,6,7 to 0, 1, 2, 3, ... and add comman in last enum value

* update path

* Update NL Snippy path

* Resolve conflict

* Update protected material API

* update project sample

* Change path name

* Update protect material contract

* update jailbreak

* Remove project related contract (#20)

* Remove project related things

* Remove accepted

* Remove examples

* Add list category APIs

---------






* Update contract for incident response (#24)



* scenarios to enumerations (#25)

* [Cognitive Services - Azure AI Content Safety] - 2023-11-30-preview Private Preview

* update doc

* resolve comments.

* Merge main and recompile swagger

* add explanation for 2023-11-30-preview

* format

* generate swagger

* Optimize contract (#36)

* add 12-30-preview, add explanation spec

* update

* renamed reason -> harmful chunks

* update.

* remove new version enum from GA version

* Remove examples from 1015

* restore examples

* Add examples for jailbreak and protected material

* run prettier for example

* commit add enum to stable

* Add omit-unreachable-types: true to typespec

* compile preview

* Fix readme

* renamed to citation

* UPDATE: add reasoning column and update some docs.

* update doc.

* update api version.

* Fix some typo issues. (#40)

* Update data plane.

* Remove unused versions

---------

Co-authored-by: FAREAST\suxi <suxi@microsoft.com>
Co-authored-by: Lixiang Liu <lixiangliu@microsoft.com>
Co-authored-by: Lixiang Liu <liulixiang1988@gmail.com>
Co-authored-by: zhaiyutong <mo.huainian@163.com>
Co-authored-by: YUTONG_ZHAI <32332316+zhaiyutong@users.noreply.github.com>
Co-authored-by: Jie Zhou <zhojie@microsoft.com>
Co-authored-by: Yuxiao Wang <yuxiaowang@microsoft.com>
Co-authored-by: Yuxiao Wang <58904990+Sayaka-4987@users.noreply.github.com>
Co-authored-by: jiezhou_microsoft <94604058+JieZhou000@users.noreply.github.com>
  • Loading branch information
10 people authored Jan 11, 2024
1 parent ea28180 commit 87e46c2
Show file tree
Hide file tree
Showing 26 changed files with 7,191 additions and 1 deletion.
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 @@
{
"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

0 comments on commit 87e46c2

Please sign in to comment.