From 0a5e52cbaf798ee66361e96f68af333682b63c0d Mon Sep 17 00:00:00 2001 From: mengaims <50131889+mengaims@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:37:22 +0800 Subject: [PATCH] [Cognitive Services - Azure AI Content Safety] - [Private Preview] - Add Image Batch Detection (#27353) * Add private preview versions to feature branch (#43) * 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 --------- Co-authored-by: FAREAST\suxi Co-authored-by: Lixiang Liu Co-authored-by: Lixiang Liu Co-authored-by: zhaiyutong * 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 --------- Co-authored-by: FAREAST\suxi Co-authored-by: Lixiang Liu Co-authored-by: Lixiang Liu Co-authored-by: zhaiyutong * Update contract for incident response (#24) Co-authored-by: Lixiang Liu * 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 Co-authored-by: Lixiang Liu Co-authored-by: Lixiang Liu Co-authored-by: zhaiyutong Co-authored-by: YUTONG_ZHAI <32332316+zhaiyutong@users.noreply.github.com> Co-authored-by: Jie Zhou Co-authored-by: Yuxiao Wang Co-authored-by: Yuxiao Wang <58904990+Sayaka-4987@users.noreply.github.com> Co-authored-by: jiezhou_microsoft <94604058+JieZhou000@users.noreply.github.com> * Customized category / customized model related spec changes (#45) * 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 --------- Co-authored-by: FAREAST\suxi Co-authored-by: Lixiang Liu Co-authored-by: Lixiang Liu Co-authored-by: zhaiyutong * 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 --------- Co-authored-by: FAREAST\suxi Co-authored-by: Lixiang Liu Co-authored-by: Lixiang Liu Co-authored-by: zhaiyutong * Update contract for incident response (#24) Co-authored-by: Lixiang Liu * 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. * draft * draft * draft * draft * draft * draft * draft * draft * draft * draft * draft * update bd draft * update spec draft * update spec draft * update spec draft --------- Co-authored-by: mengaims Co-authored-by: FAREAST\suxi Co-authored-by: Lixiang Liu Co-authored-by: Lixiang Liu Co-authored-by: zhaiyutong Co-authored-by: mengaims <50131889+mengaims@users.noreply.github.com> Co-authored-by: YUTONG_ZHAI <32332316+zhaiyutong@users.noreply.github.com> Co-authored-by: Jie Zhou Co-authored-by: Yuxiao Wang Co-authored-by: Yuxiao Wang <58904990+Sayaka-4987@users.noreply.github.com> Co-authored-by: jiezhou_microsoft <94604058+JieZhou000@users.noreply.github.com> Co-authored-by: David Liang * Add async batch image APIs in 2024-01-30-preview (#44) * Add async batch image APIs in 2024-01-30-preview * Update * Update * Add error message in GET resonse * Mengai/acs customization (#47) * Change annotation API * Add prompt generation APIs * fix explanation version (#52) * fix explanation version * delete 0130 version * Update async batch image APIs in 2023-10-30-preview (#54) * Add async batch image APIs in 2024-01-30-preview * Update * Update * Add error message in GET resonse * Update async batch image APIs in 2023-10-30-preview * remove customized category (#59) * Update batch image API contract (#60) * Mengai/0130 private fix (#61) * remove customized category * remove useless definition * Mengai/0130 private fix (#62) * remove customized category * remove useless definition * change progressPercentage to int32 * Resolve warnings * Suppress spell check * Renaming --------- Co-authored-by: FAREAST\suxi Co-authored-by: Lixiang Liu Co-authored-by: Lixiang Liu Co-authored-by: zhaiyutong Co-authored-by: YUTONG_ZHAI <32332316+zhaiyutong@users.noreply.github.com> Co-authored-by: Jie Zhou Co-authored-by: Yuxiao Wang Co-authored-by: Yuxiao Wang <58904990+Sayaka-4987@users.noreply.github.com> Co-authored-by: jiezhou_microsoft <94604058+JieZhou000@users.noreply.github.com> Co-authored-by: David Liang Co-authored-by: David Liang Co-authored-by: MinjueWu <597922968@qq.com> --- cSpell.json | 11 +- .../cognitiveservices/ContentSafety/main.tsp | 3 - .../ContentSafety/models.tsp | 132 +- .../ContentSafety/routes.tsp | 34 + .../2023-10-30-preview/contentsafety.json | 397 ++- .../2024-01-30-preview/contentsafety.json | 3059 ----------------- 6 files changed, 561 insertions(+), 3075 deletions(-) delete mode 100644 specification/cognitiveservices/data-plane/ContentSafety/preview/2024-01-30-preview/contentsafety.json diff --git a/cSpell.json b/cSpell.json index 53edfde971f0..6425797918ff 100644 --- a/cSpell.json +++ b/cSpell.json @@ -966,7 +966,16 @@ "words": [ "throughputpool" ] - } + }, + { + "filename": "**/specification/cognitiveservices/data-plane/ContentSafety/**/*.json", + "words": [ + "Ungroundedness", + "ungroundedness", + "Selfharm", + "Withtext" + ] + } ], "enableFiletypes": [ "cadl" diff --git a/specification/cognitiveservices/ContentSafety/main.tsp b/specification/cognitiveservices/ContentSafety/main.tsp index f98389174c9b..e50e8d924e4f 100644 --- a/specification/cognitiveservices/ContentSafety/main.tsp +++ b/specification/cognitiveservices/ContentSafety/main.tsp @@ -47,7 +47,4 @@ enum Versions { @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", } diff --git a/specification/cognitiveservices/ContentSafety/models.tsp b/specification/cognitiveservices/ContentSafety/models.tsp index 6459f69d9e01..0b240407f367 100644 --- a/specification/cognitiveservices/ContentSafety/models.tsp +++ b/specification/cognitiveservices/ContentSafety/models.tsp @@ -40,6 +40,32 @@ enum AnalyzeImageOutputType { FourSeverityLevels, } +@added(ContentSafety.Versions.v2023_10_30_Preview) +@doc("The type of batch results storage mode.") +enum BatchResultsStorageMode { + @doc("Merge each result into one file.") + CollectiveResultFile, + + @doc("Store each result in a single file.") + IndividualResultFiles, +} + +@added(ContentSafety.Versions.v2023_10_30_Preview) +@doc("The type of batch analysis task status.") +enum BatchTaskStatus { + @doc("The task has not started yet.") + NotStarted, + + @doc("The task is in progress.") + Running, + + @doc("The task has failed.") + Failed, + + @doc("The task has been succeeded.") + Succeeded, +} + @doc("The text analysis request.") model AnalyzeTextOptions { @doc("The text needs to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request.") @@ -85,7 +111,7 @@ model AnalyzeTextResult { @doc("The incident match details.") incidentMatches?: IncidentMatch[]; - @added(ContentSafety.Versions.v2024_01_30_Preview) + @added(ContentSafety.Versions.v2023_10_30_Preview) @doc("Chunks in the original text detected as harmful content. Analysis result and scores are caused by these.") citation?: string[]; } @@ -169,6 +195,90 @@ model ImageCategoriesAnalysis { severity?: int32; } +@added(ContentSafety.Versions.v2023_10_30_Preview) +@doc("The image batch analysis request.") +model BatchAnalyzeImagesOptions { + @doc("The blob parameters of images to be analyzed.") + images: BatchAnalyzeImages; + + @doc("The blob parameters of result files.") + resultsBlob: BatchAnalyzeImagesResultsBlob; + + @doc("The storage mode for the batch task results, either 'CollectiveResultFile' or 'IndividualResultFiles'.") + resultsStorageMode?: BatchResultsStorageMode = BatchResultsStorageMode.CollectiveResultFile; + + @doc("The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned.") + categories?: ImageCategory[]; + + @doc("This refers to the type of image analysis output. If no value is assigned, the default value will be 'FourSeverityLevels'.") + outputType?: AnalyzeImageOutputType = AnalyzeImageOutputType.FourSeverityLevels; + + @doc("The incidents to detect.") + incidents?: IncidentOptions; +} + +@added(ContentSafety.Versions.v2023_10_30_Preview) +@doc("The image batch analysis input.") +model BatchAnalyzeImages { + @doc("The URL to a blob prefix which represents a directory containing all the images to be analyzed in this batch task.") + blobPrefixLocation: url; + + @doc("The delimiter character you desire to use in the location URL, typically '/'.") + delimiter: string; + + @doc("An array of strings indicating file extensions of desired images within the logical folder.") + extensions: string[]; + + @doc("The last modified time (in RFC1123 format) of blobs. Only images that were modified before this time will be analyzed.") + lastModified?: utcDateTime; +} + +@added(ContentSafety.Versions.v2023_10_30_Preview) +@doc("The image batch analysis output.") +model BatchAnalyzeImagesResultsBlob { + @doc("The URL to a blob prefix which represents a directory. The analysis result file(s) will be written to this directory.") + blobPrefixLocation: url; + + @doc("The delimiter character you desire to use in the location URL, typically '/'.") + delimiter: string; +} + +@added(ContentSafety.Versions.v2023_10_30_Preview) +@doc("Image batch analyze task.") +@resource("image/batchAnalyses") +model ImageBatchTaskDetail { + @doc("The id of image batch analysis task.") + @key("operationId") + @visibility("read", "create", "query") + @maxLength(64) + id: string; + + @doc("The kind of operation.") + kind: string; + + @doc("The status of the batch image analysis task.") + status: BatchTaskStatus; + + @doc("Batch task result.") + result: ImageBatchTaskResult; + + @doc("Return error detail when the task failed.") + error?: Azure.Core.Foundations.Error; +} + +@added(ContentSafety.Versions.v2023_10_30_Preview) +@doc("Image batch task result.") +model ImageBatchTaskResult { + @doc("The timestamp of when batch image analysis task was created.") + createdTime: utcDateTime; + + @doc("The progress of the batch image analysis task, represented as a percentage (0-100).") + progressPercentage: int32; + + @doc("The blob parameters of result files.") + resultsBlob: BatchAnalyzeImagesResultsBlob; +} + @doc("Text Blocklist.") @resource("text/blocklists") model TextBlocklist { @@ -450,15 +560,23 @@ model AnnotateTextResult { @added(Versions.v2023_10_30_Preview) @doc("Pre-defined concept.") model PreDefinedConcept { + @doc("The concept name.") concept: string; + + @doc("The concept description.") description: string; } @added(Versions.v2023_10_30_Preview) @doc("Label definition.") -model SubCategory { +model Subcategory { + @doc("The id of subcategory.") id: int32; + + @doc("The name of subcategory.") name: string; + + @doc("The description of subcategory.") statements: string[]; } @@ -473,9 +591,16 @@ model TextCustomizedCategory { @maxLength(64) categoryName: string; + @doc("Some pre defined concepts used in definition.") preDefinedConcepts?: PreDefinedConcept[]; - subCategories: SubCategory[]; + + @doc("Subcategories in the customized category.") + subcategories: Subcategory[]; + + @doc("Text customizedCategories emphases.") emphases?: string[]; + + @doc("Text url of example jsonl blob.") exampleBlobUrl?: url; } @@ -539,6 +664,7 @@ enum Task { QnA, } +#suppress "@azure-tools/typespec-azure-core/casing-style" "MUST fix in next update" @added(Versions.v2023_10_30_Preview) @doc("Connection details for the GPT resource.") model GptResource { diff --git a/specification/cognitiveservices/ContentSafety/routes.tsp b/specification/cognitiveservices/ContentSafety/routes.tsp index 6e0b436297b0..9717ac575159 100644 --- a/specification/cognitiveservices/ContentSafety/routes.tsp +++ b/specification/cognitiveservices/ContentSafety/routes.tsp @@ -81,6 +81,40 @@ interface ImageOperations { >; } +interface ImageBatchOperations { + #suppress "@azure-tools/typespec-azure-core/no-rpc-path-params" "MUST fix in next update" + @added(ContentSafety.Versions.v2023_10_30_Preview) + @summary("Start Batch Analyze Images") + @doc("An asynchronous API for the batch analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.") + @route("/image/batchAnalyses") + @put + batchAnalyzeImage is Azure.Core.RpcOperation< + { + @path + @doc("The unique operation id.") + operationId: string; + + @body + @doc("The image batch analysis request.") + body: BatchAnalyzeImagesOptions; + }, + ImageBatchTaskDetail + >; + + @added(ContentSafety.Versions.v2023_10_30_Preview) + @summary("Get Image Batch Analysis task Status") + @doc("Check the status of a batch image analysis task.") + getBatchTaskStatus is Azure.Core.ResourceRead; + + @added(ContentSafety.Versions.v2023_10_30_Preview) + @summary("List All Image Batch Analysis Tasks") + @doc("List all batch image analysis tasks.") + listBatchTasks is Azure.Core.ResourceList< + ImageBatchTaskDetail, + ListQueryParametersTrait + >; +} + interface BlockOps extends Azure.Core.ResourceOperations.cognitiveservices.azure.com).", - "required": true, - "type": "string" - } - ] - }, - "produces": [ - "application/json" - ], - "consumes": [ - "application/json" - ], - "security": [ - { - "ApiKeyAuth": [] - }, - { - "OAuth2Auth": [ - "https://cognitiveservices.azure.com/.default" - ] - } - ], - "securityDefinitions": { - "ApiKeyAuth": { - "type": "apiKey", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - }, - "OAuth2Auth": { - "type": "oauth2", - "flow": "application", - "scopes": { - "https://cognitiveservices.azure.com/.default": "" - }, - "tokenUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/token" - } - }, - "tags": [], - "paths": { - "/image/incidents": { - "get": { - "operationId": "ImageIncidents_ListIncidents", - "summary": "Get All Image Incidents", - "description": "Get all incidents details.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "$ref": "#/parameters/Azure.Core.TopQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.SkipQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/PagedImageIncident" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/image/incidents/{incidentName}": { - "get": { - "operationId": "ImageIncidents_GetIncidents", - "summary": "Get Image Incident By incidentName", - "description": "Returns image incident details.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/ImageIncident" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - }, - "patch": { - "operationId": "ImageIncidents_CreateOrUpdateIncident", - "summary": "Create Or Update Image Incident", - "description": "Updates a image incident. If the image incident does not exist, a new image incident will be created.", - "consumes": [ - "application/merge-patch+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "resource", - "in": "body", - "description": "The resource instance.", - "required": true, - "schema": { - "$ref": "#/definitions/ImageIncidentCreateOrUpdate" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/ImageIncident" - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "schema": { - "$ref": "#/definitions/ImageIncident" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - }, - "delete": { - "operationId": "ImageIncidents_DeleteIncident", - "summary": "Delete Image Incident By incidentName", - "description": "Deletes a image incident.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/image/incidents/{incidentName}:addIncidentSamples": { - "post": { - "operationId": "ImageIncidents_AddIncidentSamples", - "summary": "Add ImageIncidentSamples To Incident", - "description": "Add imageIncidentSamples to an incident. You can add at most 100 imageIncidentSamples in one request.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddImageIncidentSamplesOptions" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/AddImageIncidentSamplesResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/image/incidents/{incidentName}:removeIncidentSamples": { - "post": { - "operationId": "ImageIncidents_RemoveIncidentSamples", - "summary": "Remove ImageIncidentSamples From Incident", - "description": "Remove imageIncidentSamples from an incident. You can remove at most 100 Image Incident in one request.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RemoveImageIncidentSamplesOptions" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/image/incidents/{incidentName}/incidentSamples": { - "get": { - "operationId": "ImageIncidents_ListIncidentSamples", - "summary": "Get All ImageIncidentSamples By imageIncidentName", - "description": "Get all ImageIncidentSamples in a image incident.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "$ref": "#/parameters/Azure.Core.TopQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.SkipQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/PagedListImageIncidentSampleResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/image/incidents/{incidentName}/incidentSamples/{incidentSampleId}": { - "get": { - "operationId": "ImageIncidents_GetIncidentSample", - "summary": "Get ImageIncidentSample By imageIncidentName And imageIncidentSampleId", - "description": "Get imageIncidentSample by imageIncidentName and imageIncidentSampleId from a image incident.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "incidentSampleId", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64 - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/ImageIncidentSampleResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/image:analyze": { - "post": { - "operationId": "ImageOperations_AnalyzeImage", - "summary": "Analyze Image", - "description": "A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", - "in": "body", - "description": "The image analysis request.", - "required": true, - "schema": { - "$ref": "#/definitions/AnalyzeImageOptions" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/AnalyzeImageResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/imageWithText:analyze": { - "post": { - "operationId": "ImageWithTextOperations_AnalyzeImageWithText", - "summary": "Analyze Image With Text", - "description": "A synchronous API for the analysis of potentially harmful image with text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", - "in": "body", - "description": "The image with text analysis request.", - "required": true, - "schema": { - "$ref": "#/definitions/AnalyzeImageWithTextOptions" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/AnalyzeImageWithTextResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text/blocklists": { - "get": { - "operationId": "TextBlocklists_ListTextBlocklists", - "summary": "Get All Text Blocklists", - "description": "Get all text blocklists details.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/PagedTextBlocklist" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/text/blocklists/{blocklistName}": { - "get": { - "operationId": "TextBlocklists_GetTextBlocklist", - "summary": "Get Text Blocklist By blocklistName", - "description": "Returns text blocklist details.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "blocklistName", - "in": "path", - "description": "Text blocklist name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/TextBlocklist" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - }, - "patch": { - "operationId": "TextBlocklists_CreateOrUpdateTextBlocklist", - "summary": "Create Or Update Text Blocklist", - "description": "Updates a text blocklist. If the blocklistName does not exist, a new blocklist will be created.", - "consumes": [ - "application/merge-patch+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "blocklistName", - "in": "path", - "description": "Text blocklist name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "resource", - "in": "body", - "description": "The resource instance.", - "required": true, - "schema": { - "$ref": "#/definitions/TextBlocklistCreateOrUpdate" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/TextBlocklist" - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "schema": { - "$ref": "#/definitions/TextBlocklist" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - }, - "delete": { - "operationId": "TextBlocklists_DeleteTextBlocklist", - "summary": "Delete Text Blocklist By blocklistName", - "description": "Deletes a text blocklist.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "blocklistName", - "in": "path", - "description": "Text blocklist name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text/blocklists/{blocklistName}:addOrUpdateBlocklistItems": { - "post": { - "operationId": "TextBlocklists_AddOrUpdateBlocklistItems", - "summary": "Add or update BlocklistItems To Text Blocklist", - "description": "Add or update blocklistItems to a text blocklist. You can add or update at most 100 blocklistItems in one request.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "blocklistName", - "in": "path", - "description": "Text blocklist name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "body", - "in": "body", - "description": "Options for adding or updating blocklist items.", - "required": true, - "schema": { - "$ref": "#/definitions/AddOrUpdateTextBlocklistItemsOptions" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/AddOrUpdateTextBlocklistItemsResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text/blocklists/{blocklistName}:removeBlocklistItems": { - "post": { - "operationId": "TextBlocklists_RemoveBlocklistItems", - "summary": "Remove BlocklistItems From Text Blocklist", - "description": "Remove blocklistItems from a text blocklist. You can remove at most 100 BlocklistItems in one request.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "blocklistName", - "in": "path", - "description": "Text blocklist name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "body", - "in": "body", - "description": "Options for removing blocklist items.", - "required": true, - "schema": { - "$ref": "#/definitions/RemoveTextBlocklistItemsOptions" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text/blocklists/{blocklistName}/blocklistItems": { - "get": { - "operationId": "TextBlocklists_ListTextBlocklistItems", - "summary": "Get All BlocklistItems By blocklistName", - "description": "Get all blocklistItems in a text blocklist.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "blocklistName", - "in": "path", - "description": "Text blocklist name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "$ref": "#/parameters/Azure.Core.TopQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.SkipQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/PagedTextBlocklistItem" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/text/blocklists/{blocklistName}/blocklistItems/{blocklistItemId}": { - "get": { - "operationId": "TextBlocklists_GetTextBlocklistItem", - "summary": "Get BlocklistItem By blocklistName And blocklistItemId", - "description": "Get blocklistItem by blocklistName and blocklistItemId from a text blocklist.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "blocklistName", - "in": "path", - "description": "Text blocklist name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "blocklistItemId", - "in": "path", - "description": "The service will generate a BlocklistItemId, which will be a UUID.", - "required": true, - "type": "string", - "maxLength": 64 - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/TextBlocklistItem" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text/categories": { - "get": { - "operationId": "TextCategoryCustomization_ListTextCustomizedCategory", - "description": "Resource list operation template.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "$ref": "#/parameters/Azure.Core.TopQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.SkipQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/PagedTextCustomizedCategory" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/text/categories/{categoryName}": { - "get": { - "operationId": "TextCategoryCustomization_GetTextCustomizedCategory", - "description": "Resource read operation template.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "categoryName", - "in": "path", - "description": "Text customizedCategories name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^Customized_[0-9A-Za-z._~-]+$" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/TextCustomizedCategory" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - }, - "put": { - "operationId": "TextCategoryCustomization_CreateOrReplaceTextCustomizedCategory", - "description": "Create or replace operation template.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "categoryName", - "in": "path", - "description": "Text customizedCategories name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^Customized_[0-9A-Za-z._~-]+$" - }, - { - "name": "resource", - "in": "body", - "description": "The resource instance.", - "required": true, - "schema": { - "$ref": "#/definitions/TextCustomizedCategory" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/TextCustomizedCategory" - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "schema": { - "$ref": "#/definitions/TextCustomizedCategory" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - }, - "delete": { - "operationId": "TextCategoryCustomization_DeleteTextCustomizedCategory", - "description": "Resource delete operation template.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "categoryName", - "in": "path", - "description": "Text customizedCategories name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^Customized_[0-9A-Za-z._~-]+$" - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text/incidents": { - "get": { - "operationId": "TextIncidents_ListIncidents", - "summary": "Get All Text Incidents", - "description": "Get all incidents details.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "$ref": "#/parameters/Azure.Core.TopQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.SkipQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/PagedTextIncident" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/text/incidents/{incidentName}": { - "get": { - "operationId": "TextIncidents_GetIncidents", - "summary": "Get Text Incident By incidentName", - "description": "Returns text incident details.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/TextIncident" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - }, - "patch": { - "operationId": "TextIncidents_CreateOrUpdateIncident", - "summary": "Create Or Update Text Incident", - "description": "Updates a text incident. If the text incident does not exist, a new text incident will be created.", - "consumes": [ - "application/merge-patch+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "resource", - "in": "body", - "description": "The resource instance.", - "required": true, - "schema": { - "$ref": "#/definitions/TextIncidentCreateOrUpdate" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/TextIncident" - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "schema": { - "$ref": "#/definitions/TextIncident" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - }, - "delete": { - "operationId": "TextIncidents_DeleteIncident", - "summary": "Delete Text Incident By incidentName", - "description": "Deletes a text incident.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text/incidents/{incidentName}:addIncidentSamples": { - "post": { - "operationId": "TextIncidents_AddIncidentSamples", - "summary": "Add TextIncidentSamples To Incident", - "description": "Add textIncidentSamples to an incident. You can add at most 100 textIncidentSamples in one request.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddTextIncidentSamplesOptions" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/AddTextIncidentSamplesResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text/incidents/{incidentName}:removeIncidentSamples": { - "post": { - "operationId": "TextIncidents_RemoveIncidentSamples", - "summary": "Remove TextIncidentSamples From Incident", - "description": "Remove textIncidentSamples from an incident. You can remove at most 100 Text Incident in one request.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RemoveTextIncidentSamplesOptions" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text/incidents/{incidentName}/incidentSamples": { - "get": { - "operationId": "TextIncidents_ListIncidentSamples", - "summary": "Get All TextIncidentSamples By textIncidentName", - "description": "Get all TextIncidentSamples in a text incident.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "$ref": "#/parameters/Azure.Core.TopQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.SkipQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/PagedTextIncidentSample" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/text/incidents/{incidentName}/incidentSamples/{incidentSampleId}": { - "get": { - "operationId": "TextIncidents_GetIncidentSample", - "summary": "Get TextIncidentSample By textIncidentName And textIncidentSampleId", - "description": "Get textIncidentSample by textIncidentName and textIncidentSampleId from a text incident.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "incidentName", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "incidentSampleId", - "in": "path", - "description": "incident name.", - "required": true, - "type": "string", - "maxLength": 64 - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/TextIncidentSample" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text:adaptiveAnnotate": { - "post": { - "operationId": "PromptTextOperations_AnnotateText", - "summary": "Annotate Text by Prompt", - "description": "A remote procedure call (RPC) operation.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", - "in": "body", - "description": "The text analysis request.", - "required": true, - "schema": { - "$ref": "#/definitions/AnnotateTextOptions" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/AnnotateTextResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text:analyze": { - "post": { - "operationId": "TextOperations_AnalyzeText", - "summary": "Analyze Text", - "description": "A synchronous API for the analysis of potentially harmful text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", - "in": "body", - "description": "The text analysis request.", - "required": true, - "schema": { - "$ref": "#/definitions/AnalyzeTextOptions" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/AnalyzeTextResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text:detectJailbreak": { - "post": { - "operationId": "TextOperations_DetectTextJailbreak", - "summary": "Analyze Text Jailbreak", - "description": "A synchronous API for the analysis of text jailbreak.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", - "in": "body", - "description": "The text jailbreak analysis request.", - "required": true, - "schema": { - "$ref": "#/definitions/AnalyzeTextJailbreakOptions" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/AnalyzeTextJailbreakResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text:detectProtectedMaterial": { - "post": { - "operationId": "TextOperations_DetectTextProtectedMaterial", - "summary": "Analyze Protected Material", - "description": "A synchronous API for the analysis of protected material.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", - "in": "body", - "description": "The text protected material analysis request.", - "required": true, - "schema": { - "$ref": "#/definitions/AnalyzeTextProtectedMaterialOptions" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/AnalyzeTextProtectedMaterialResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - }, - "/text:detectUngroundedness": { - "post": { - "operationId": "TextUngroundednessDetectionOperations_DetectUngroundedness", - "summary": "Detect Ungrounded Information", - "description": "A synchronous API for the analysis of language model outputs to determine alignment with user-provided information or identify fictional content.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", - "in": "body", - "description": "The ungroundedness detection request.", - "required": true, - "schema": { - "$ref": "#/definitions/DetectUngroundednessOptions" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/DetectUngroundednessResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - } - } - } - }, - "definitions": { - "AddImageIncidentSamplesOptions": { - "type": "object", - "description": "The request to add incidentSamples to a incident.", - "properties": { - "incidentSamples": { - "type": "array", - "description": "Array of incidentSamples to add.", - "items": { - "$ref": "#/definitions/ImageIncidentSample" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "incidentSamples" - ] - }, - "AddImageIncidentSamplesResult": { - "type": "object", - "description": "The response of adding incidentSamples to the incident.", - "properties": { - "incidentSamples": { - "type": "array", - "description": "Array of incidentSamples have been added.", - "items": { - "$ref": "#/definitions/ListImageIncidentSampleResult" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "incidentSamples" - ] - }, - "AddOrUpdateTextBlocklistItemsOptions": { - "type": "object", - "description": "The request to add blocklistItems to a text blocklist.", - "properties": { - "blocklistItems": { - "type": "array", - "description": "Array of blocklistItems to add.", - "items": { - "$ref": "#/definitions/TextBlocklistItem" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "blocklistItems" - ] - }, - "AddOrUpdateTextBlocklistItemsResult": { - "type": "object", - "description": "The response of adding blocklistItems to the text blocklist.", - "properties": { - "blocklistItems": { - "type": "array", - "description": "Array of blocklistItems have been added.", - "items": { - "$ref": "#/definitions/TextBlocklistItem" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "blocklistItems" - ] - }, - "AddTextIncidentSamplesOptions": { - "type": "object", - "description": "The request to add incidentSamples to a incident.", - "properties": { - "incidentSamples": { - "type": "array", - "description": "Array of incidentSamples to add.", - "items": { - "$ref": "#/definitions/TextIncidentSample" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "incidentSamples" - ] - }, - "AddTextIncidentSamplesResult": { - "type": "object", - "description": "The response of adding incidentSamples to the incident.", - "properties": { - "incidentSamples": { - "type": "array", - "description": "Array of incidentSamples have been added.", - "items": { - "$ref": "#/definitions/TextIncidentSample" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "incidentSamples" - ] - }, - "AnalyzeImageOptions": { - "type": "object", - "description": "The image analysis request.", - "properties": { - "image": { - "$ref": "#/definitions/ImageData", - "description": "The image needs to be analyzed." - }, - "categories": { - "type": "array", - "description": "The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned.", - "items": { - "$ref": "#/definitions/ImageCategory" - } - }, - "outputType": { - "$ref": "#/definitions/AnalyzeImageOutputType", - "description": "This refers to the type of image analysis output. If no value is assigned, the default value will be \"FourSeverityLevels\".", - "default": "FourSeverityLevels" - }, - "incidents": { - "$ref": "#/definitions/IncidentOptions", - "description": "The incidents to detect." - } - }, - "required": [ - "image" - ] - }, - "AnalyzeImageOutputType": { - "type": "string", - "description": "The type of image analysis output.", - "enum": [ - "FourSeverityLevels" - ], - "x-ms-enum": { - "name": "AnalyzeImageOutputType", - "modelAsString": true, - "values": [ - { - "name": "FourSeverityLevels", - "value": "FourSeverityLevels", - "description": "Output severities in four levels, the value could be 0,2,4,6." - } - ] - } - }, - "AnalyzeImageResult": { - "type": "object", - "description": "The image analysis response.", - "properties": { - "categoriesAnalysis": { - "type": "array", - "description": "Analysis result for categories.", - "items": { - "$ref": "#/definitions/ImageCategoriesAnalysis" - }, - "x-ms-identifiers": [] - }, - "incidentMatches": { - "type": "array", - "description": "The incident match details.", - "items": { - "$ref": "#/definitions/IncidentMatch" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "categoriesAnalysis" - ] - }, - "AnalyzeImageWithTextOptions": { - "type": "object", - "description": "The analysis request of the image with text.", - "properties": { - "image": { - "$ref": "#/definitions/ImageData", - "description": "The image needs to be analyzed." - }, - "text": { - "type": "string", - "description": "The text attached to the image. We support at most 1k characters (unicode code points) in one text request.", - "maxLength": 1000 - }, - "categories": { - "type": "array", - "description": "The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned.", - "items": { - "$ref": "#/definitions/ImageWithTextCategory" - } - }, - "enableOcr": { - "type": "boolean", - "description": "When set to true, our service will perform OCR and concatenate the recognized text with input text before analyzing. We will recognize at most 256 characters (unicode code points) from input image. The others will be truncated." - } - }, - "required": [ - "image", - "enableOcr" - ] - }, - "AnalyzeImageWithTextResult": { - "type": "object", - "description": "The analysis response of the image with text.", - "properties": { - "categoriesAnalysis": { - "type": "array", - "description": "Analysis result for categories.", - "items": { - "$ref": "#/definitions/ImageWithTextCategoriesAnalysis" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "categoriesAnalysis" - ] - }, - "AnalyzeTextJailbreakOptions": { - "type": "object", - "description": "The text jailbreak analysis request.", - "properties": { - "text": { - "type": "string", - "description": "The text needs to be analyzed if it attempt to jailbreak. We support a maximum of 1k Unicode characters (Unicode code points) in the text of one request.", - "maxLength": 1000 - } - }, - "required": [ - "text" - ] - }, - "AnalyzeTextJailbreakResult": { - "type": "object", - "description": "The text jailbreak analysis request.", - "properties": { - "jailbreakAnalysis": { - "$ref": "#/definitions/JailbreakAnalysisResult", - "description": "Analysis result for jailbreak." - } - }, - "required": [ - "jailbreakAnalysis" - ] - }, - "AnalyzeTextOptions": { - "type": "object", - "description": "The text analysis request.", - "properties": { - "text": { - "type": "string", - "description": "The text needs to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request.", - "maxLength": 10000 - }, - "categories": { - "type": "array", - "description": "The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned.", - "items": { - "$ref": "#/definitions/TextCategory" - } - }, - "blocklistNames": { - "type": "array", - "description": "The names of blocklists.", - "items": { - "type": "string" - } - }, - "haltOnBlocklistHit": { - "type": "boolean", - "description": "When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit." - }, - "outputType": { - "$ref": "#/definitions/AnalyzeTextOutputType", - "description": "This refers to the type of text analysis output. If no value is assigned, the default value will be \"FourSeverityLevels\".", - "default": "FourSeverityLevels" - }, - "incidents": { - "$ref": "#/definitions/IncidentOptions", - "description": "The incidents to detect." - } - }, - "required": [ - "text" - ] - }, - "AnalyzeTextOutputType": { - "type": "string", - "description": "The type of text analysis output.", - "enum": [ - "FourSeverityLevels", - "EightSeverityLevels" - ], - "x-ms-enum": { - "name": "AnalyzeTextOutputType", - "modelAsString": true, - "values": [ - { - "name": "FourSeverityLevels", - "value": "FourSeverityLevels", - "description": "Output severities in four levels, the value could be 0,2,4,6." - }, - { - "name": "EightSeverityLevels", - "value": "EightSeverityLevels", - "description": "Output severities in eight levels, the value could be 0,1,2,3,4,5,6,7." - } - ] - } - }, - "AnalyzeTextProtectedMaterialOptions": { - "type": "object", - "description": "The protected material analysis request.", - "properties": { - "text": { - "type": "string", - "description": "The text needs to be analyzed. We support a maximum of 1k Unicode characters (Unicode code points) in the text of one request.", - "maxLength": 1000 - } - }, - "required": [ - "text" - ] - }, - "AnalyzeTextProtectedMaterialResult": { - "type": "object", - "description": "The protected material analysis response.", - "properties": { - "protectedMaterialAnalysis": { - "$ref": "#/definitions/ProtectedMaterialAnalysisResult", - "description": "Analysis result for protected material." - } - }, - "required": [ - "protectedMaterialAnalysis" - ] - }, - "AnalyzeTextResult": { - "type": "object", - "description": "The text analysis response.", - "properties": { - "blocklistsMatch": { - "type": "array", - "description": "The blocklist match details.", - "items": { - "$ref": "#/definitions/TextBlocklistMatch" - }, - "x-ms-identifiers": [] - }, - "categoriesAnalysis": { - "type": "array", - "description": "Analysis result for categories.", - "items": { - "$ref": "#/definitions/TextCategoriesAnalysis" - }, - "x-ms-identifiers": [] - }, - "incidentMatches": { - "type": "array", - "description": "The incident match details.", - "items": { - "$ref": "#/definitions/IncidentMatch" - }, - "x-ms-identifiers": [] - }, - "citation": { - "type": "array", - "description": "Chunks in the original text detected as harmful content. Analysis result and scores are caused by these.", - "items": { - "type": "string" - } - } - }, - "required": [ - "categoriesAnalysis" - ] - }, - "AnnotateTextOptions": { - "type": "object", - "description": "Annotate text options", - "properties": { - "text": { - "type": "string", - "description": "The text needs to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request.", - "maxLength": 10000 - }, - "category": { - "type": "string", - "description": "The category will be analyzed, you can set your customized category or one of built-in categories in 'Hate','Selfharm', 'Sexual' and 'Violence'." - } - }, - "required": [ - "text", - "category" - ] - }, - "AnnotateTextResult": { - "type": "object", - "description": "The text annotation response.", - "properties": { - "id": { - "type": "integer", - "format": "int32", - "description": "The id of annotated subcategory." - }, - "name": { - "type": "string", - "description": "The name of annotated subcategory." - }, - "reasoning": { - "type": "string", - "description": "The reasoning." - } - }, - "required": [ - "id", - "name" - ] - }, - "Azure.Core.Foundations.Error": { - "type": "object", - "description": "The error object.", - "properties": { - "code": { - "type": "string", - "description": "One of a server-defined set of error codes." - }, - "message": { - "type": "string", - "description": "A human-readable representation of the error." - }, - "target": { - "type": "string", - "description": "The target of the error." - }, - "details": { - "type": "array", - "description": "An array of details about specific errors that led to this reported error.", - "items": { - "$ref": "#/definitions/Azure.Core.Foundations.Error" - }, - "x-ms-identifiers": [] - }, - "innererror": { - "$ref": "#/definitions/Azure.Core.Foundations.InnerError", - "description": "An object containing more specific information than the current object about the error." - } - }, - "required": [ - "code", - "message" - ] - }, - "Azure.Core.Foundations.ErrorResponse": { - "type": "object", - "description": "A response containing error details.", - "properties": { - "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "The error object." - } - }, - "required": [ - "error" - ] - }, - "Azure.Core.Foundations.InnerError": { - "type": "object", - "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", - "properties": { - "code": { - "type": "string", - "description": "One of a server-defined set of error codes." - }, - "innererror": { - "$ref": "#/definitions/Azure.Core.Foundations.InnerError", - "description": "Inner error." - } - } - }, - "DetectUngroundednessOptions": { - "type": "object", - "description": "The request of ungroundedness detection.", - "properties": { - "domain": { - "$ref": "#/definitions/Domain", - "description": "The domain of the text for analysis.\nThis field is optional, with a default value of Generic." - }, - "task": { - "$ref": "#/definitions/Task", - "description": "The task type for the text analysis.\nThis field is optional, with a default value of Summarization." - }, - "query": { - "type": "string", - "description": "The user's question input in a QnA scenario.\nThis field is optional, but if the task type is set to QnA, it becomes required." - }, - "text": { - "type": "string", - "description": "The text requiring analysis." - }, - "groundingSources": { - "type": "array", - "description": "The source information used as a grounding reference.", - "items": { - "type": "string" - } - }, - "reasoning": { - "type": "boolean", - "description": "A value indicating if the output includes an explanation for the identified ungroundedness.\nThis field is optional, with a default value of false." - }, - "gptResource": { - "$ref": "#/definitions/GptResource", - "description": "Connection details for the GPT resource. \nThis field will be used only when the 'reasoning' field is set to true; otherwise, it will be ignored." - } - }, - "required": [ - "text", - "groundingSources" - ] - }, - "DetectUngroundednessResult": { - "type": "object", - "description": "The response of ungroundedness detection.", - "properties": { - "ungrounded": { - "type": "boolean", - "description": "Detection result for ungrounded text." - }, - "confidenceScore": { - "type": "number", - "format": "float", - "description": "Confidence score of the model in the analysis results." - }, - "ungroundedPercentage": { - "type": "number", - "format": "float", - "description": "Percentage of ungrounded Text." - }, - "ungroundedDetails": { - "type": "array", - "description": "The detailed information about a text identified as ungrounded.", - "items": { - "$ref": "#/definitions/UngroundedDetails" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "ungrounded", - "confidenceScore", - "ungroundedPercentage", - "ungroundedDetails" - ] - }, - "Domain": { - "type": "string", - "description": "Domain.", - "enum": [ - "Generic", - "Medical" - ], - "x-ms-enum": { - "name": "Domain", - "modelAsString": true - } - }, - "GptResource": { - "type": "object", - "description": "Connection details for the GPT resource.", - "properties": { - "azureOpenAIEndpoint": { - "type": "string", - "description": "Endpoint for Azure OpenAI resource." - }, - "deploymentName": { - "type": "string", - "description": "Deployment model name." - } - }, - "required": [ - "azureOpenAIEndpoint", - "deploymentName" - ] - }, - "ImageCategoriesAnalysis": { - "type": "object", - "description": "Image analysis result.", - "properties": { - "category": { - "$ref": "#/definitions/ImageCategory", - "description": "The image analysis category." - }, - "severity": { - "type": "integer", - "format": "int32", - "description": "The value increases with the severity of the input content. The value of this field is determined by the output type specified in the request. The output type could be ‘FourSeverityLevels’, and the output value can be 0, 2, 4, 6." - } - }, - "required": [ - "category" - ] - }, - "ImageCategory": { - "type": "string", - "description": "Image analyze category.", - "enum": [ - "Hate", - "SelfHarm", - "Sexual", - "Violence" - ], - "x-ms-enum": { - "name": "ImageCategory", - "modelAsString": true - } - }, - "ImageData": { - "type": "object", - "description": "The image can be either base64 encoded bytes or a blob URL. You can choose only one of these options. If both are provided, the request will be refused. The maximum image size is 2048 x 2048 pixels and should not exceed 4 MB, while the minimum image size is 50 x 50 pixels.", - "properties": { - "content": { - "type": "string", - "format": "byte", - "description": "The Base64 encoding of the image." - }, - "blobUrl": { - "type": "string", - "format": "uri", - "description": "The blob url of the image." - } - } - }, - "ImageDataResult": { - "type": "object", - "description": "The image result is base64 encoded bytes", - "properties": { - "content": { - "type": "string", - "format": "byte", - "description": "The Base64 encoding of the image." - } - } - }, - "ImageIncident": { - "type": "object", - "description": "Image Incident.", - "properties": { - "incidentName": { - "type": "string", - "description": "incident name.", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "description": { - "type": "string", - "description": "Incident description.", - "maxLength": 1024 - }, - "created": { - "type": "string", - "format": "date-time", - "description": "Incident created time.", - "x-ms-mutability": [ - "read" - ] - }, - "lastUpdated": { - "type": "string", - "format": "date-time", - "description": "Incident updated time.", - "x-ms-mutability": [ - "read" - ] - } - }, - "required": [ - "incidentName", - "created", - "lastUpdated" - ] - }, - "ImageIncidentCreateOrUpdate": { - "type": "object", - "description": "Image Incident.", - "properties": { - "incidentName": { - "type": "string", - "description": "incident name.", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "description": { - "type": "string", - "description": "Incident description.", - "maxLength": 1024 - } - } - }, - "ImageIncidentSample": { - "type": "object", - "description": "Sample in an Image Incident.", - "properties": { - "incidentSampleId": { - "type": "string", - "description": "incident name.", - "maxLength": 64, - "readOnly": true - }, - "image": { - "$ref": "#/definitions/ImageData", - "description": "IncidentSample image content." - } - }, - "required": [ - "incidentSampleId" - ] - }, - "ImageIncidentSampleResult": { - "type": "object", - "description": "Sample Result in an Image Incident.", - "properties": { - "incidentSampleId": { - "type": "string", - "description": "incident name.", - "maxLength": 64, - "readOnly": true - }, - "image": { - "$ref": "#/definitions/ImageDataResult", - "description": "IncidentSample image content." - } - }, - "required": [ - "incidentSampleId" - ] - }, - "ImageWithTextCategoriesAnalysis": { - "type": "object", - "description": "ImageWithText analysis result.", - "properties": { - "category": { - "$ref": "#/definitions/ImageWithTextCategory", - "description": "The imageWithtext analysis category." - }, - "severity": { - "type": "integer", - "format": "int32", - "description": "The higher the severity of input content, the larger this value is. The values could be: 0,2,4,6." - } - }, - "required": [ - "category" - ] - }, - "ImageWithTextCategory": { - "type": "string", - "description": "ImageWithText analyze category.", - "enum": [ - "Hate", - "SelfHarm", - "Sexual", - "Violence" - ], - "x-ms-enum": { - "name": "ImageWithTextCategory", - "modelAsString": true - } - }, - "IncidentMatch": { - "type": "object", - "description": "The result of text incident match.", - "properties": { - "incidentName": { - "type": "string", - "description": "The name of the matched incident.", - "maxLength": 64 - } - }, - "required": [ - "incidentName" - ] - }, - "IncidentOptions": { - "type": "object", - "description": "The text analysis request.", - "properties": { - "incidentNames": { - "type": "array", - "description": "The accept decision made by service.", - "items": { - "type": "string" - } - }, - "haltOnIncidentHit": { - "type": "boolean", - "description": "When set to true, further analyses of harmful content will not be performed in cases where incidents are hit. When set to false, all analyses of harmful content will be performed, whether or not incidents are hit." - } - } - }, - "JailbreakAnalysisResult": { - "type": "object", - "description": "The text jailbreak analysis response.", - "properties": { - "detected": { - "type": "boolean", - "description": "Analysis result for jailbreak." - } - }, - "required": [ - "detected" - ] - }, - "ListImageIncidentSampleResult": { - "type": "object", - "description": "Sample in a Image Incident.", - "properties": { - "incidentSampleId": { - "type": "string", - "description": "incident name.", - "maxLength": 64, - "readOnly": true - } - }, - "required": [ - "incidentSampleId" - ] - }, - "PagedImageIncident": { - "type": "object", - "description": "Paged collection of ImageIncident items", - "properties": { - "value": { - "type": "array", - "description": "The ImageIncident items on this page", - "items": { - "$ref": "#/definitions/ImageIncident" - }, - "x-ms-identifiers": [] - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, - "PagedListImageIncidentSampleResult": { - "type": "object", - "description": "Paged collection of ListImageIncidentSampleResult items", - "properties": { - "value": { - "type": "array", - "description": "The ListImageIncidentSampleResult items on this page", - "items": { - "$ref": "#/definitions/ListImageIncidentSampleResult" - }, - "x-ms-identifiers": [] - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, - "PagedTextBlocklist": { - "type": "object", - "description": "Paged collection of TextBlocklist items", - "properties": { - "value": { - "type": "array", - "description": "The TextBlocklist items on this page", - "items": { - "$ref": "#/definitions/TextBlocklist" - }, - "x-ms-identifiers": [] - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, - "PagedTextBlocklistItem": { - "type": "object", - "description": "Paged collection of TextBlocklistItem items", - "properties": { - "value": { - "type": "array", - "description": "The TextBlocklistItem items on this page", - "items": { - "$ref": "#/definitions/TextBlocklistItem" - }, - "x-ms-identifiers": [] - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, - "PagedTextCustomizedCategory": { - "type": "object", - "description": "Paged collection of TextCustomizedCategory items", - "properties": { - "value": { - "type": "array", - "description": "The TextCustomizedCategory items on this page", - "items": { - "$ref": "#/definitions/TextCustomizedCategory" - }, - "x-ms-identifiers": [] - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, - "PagedTextIncident": { - "type": "object", - "description": "Paged collection of TextIncident items", - "properties": { - "value": { - "type": "array", - "description": "The TextIncident items on this page", - "items": { - "$ref": "#/definitions/TextIncident" - }, - "x-ms-identifiers": [] - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, - "PagedTextIncidentSample": { - "type": "object", - "description": "Paged collection of TextIncidentSample items", - "properties": { - "value": { - "type": "array", - "description": "The TextIncidentSample items on this page", - "items": { - "$ref": "#/definitions/TextIncidentSample" - }, - "x-ms-identifiers": [] - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, - "PreDefinedConcept": { - "type": "object", - "description": "Pre-defined concept.", - "properties": { - "concept": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "concept", - "description" - ] - }, - "ProtectedMaterialAnalysisResult": { - "type": "object", - "description": "The text protected material analysis response.", - "properties": { - "detected": { - "type": "boolean", - "description": "Analysis result for protected material.." - } - }, - "required": [ - "detected" - ] - }, - "RemoveImageIncidentSamplesOptions": { - "type": "object", - "description": "The request to remove incidentSamples from a incident.", - "properties": { - "incidentSampleIds": { - "type": "array", - "description": "Array of incidentSamples to remove.", - "items": { - "type": "string" - } - } - }, - "required": [ - "incidentSampleIds" - ] - }, - "RemoveTextBlocklistItemsOptions": { - "type": "object", - "description": "The request to remove blocklistItems from a text blocklist.", - "properties": { - "blocklistItemIds": { - "type": "array", - "description": "Array of blocklistItemIds to remove.", - "items": { - "type": "string" - } - } - }, - "required": [ - "blocklistItemIds" - ] - }, - "RemoveTextIncidentSamplesOptions": { - "type": "object", - "description": "The request to remove incidentSamples from a incident.", - "properties": { - "incidentSampleIds": { - "type": "array", - "description": "Array of incidentSamples to remove.", - "items": { - "type": "string" - } - } - }, - "required": [ - "incidentSampleIds" - ] - }, - "SubCategory": { - "type": "object", - "description": "Label definition.", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - }, - "statements": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "id", - "name", - "statements" - ] - }, - "Task": { - "type": "string", - "description": "Task type.", - "enum": [ - "Summarization", - "QnA" - ], - "x-ms-enum": { - "name": "Task", - "modelAsString": true - } - }, - "TextBlocklist": { - "type": "object", - "description": "Text Blocklist.", - "properties": { - "blocklistName": { - "type": "string", - "description": "Text blocklist name.", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "description": { - "type": "string", - "description": "Text blocklist description.", - "maxLength": 1024 - } - }, - "required": [ - "blocklistName" - ] - }, - "TextBlocklistCreateOrUpdate": { - "type": "object", - "description": "Text Blocklist.", - "properties": { - "blocklistName": { - "type": "string", - "description": "Text blocklist name.", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "description": { - "type": "string", - "description": "Text blocklist description.", - "maxLength": 1024 - } - } - }, - "TextBlocklistItem": { - "type": "object", - "description": "Item in a TextBlocklist.", - "properties": { - "blocklistItemId": { - "type": "string", - "description": "The service will generate a BlocklistItemId, which will be a UUID.", - "maxLength": 64, - "readOnly": true - }, - "description": { - "type": "string", - "description": "BlocklistItem description.", - "maxLength": 1024 - }, - "text": { - "type": "string", - "description": "BlocklistItem content.", - "maxLength": 128 - } - }, - "required": [ - "blocklistItemId", - "text" - ] - }, - "TextBlocklistMatch": { - "type": "object", - "description": "The result of blocklist match.", - "properties": { - "blocklistName": { - "type": "string", - "description": "The name of the matched blocklist.", - "maxLength": 64 - }, - "blocklistItemId": { - "type": "string", - "description": "The ID of the matched item.", - "maxLength": 64 - }, - "blocklistItemText": { - "type": "string", - "description": "The content of the matched item.", - "maxLength": 128 - } - }, - "required": [ - "blocklistName", - "blocklistItemId", - "blocklistItemText" - ] - }, - "TextCategoriesAnalysis": { - "type": "object", - "description": "Text analysis result.", - "properties": { - "category": { - "$ref": "#/definitions/TextCategory", - "description": "The text analysis category." - }, - "severity": { - "type": "integer", - "format": "int32", - "description": "The value increases with the severity of the input content. The value of this field is determined by the output type specified in the request. The output type could be ‘FourSeverityLevels’ or ‘EightSeverity Levels’, and the output value can be 0, 2, 4, 6 or 0, 1, 2, 3, 4, 5, 6, or 7." - } - }, - "required": [ - "category" - ] - }, - "TextCategory": { - "type": "string", - "description": "Text analyze category.", - "enum": [ - "Hate", - "SelfHarm", - "Sexual", - "Violence" - ], - "x-ms-enum": { - "name": "TextCategory", - "modelAsString": true - } - }, - "TextCustomizedCategory": { - "type": "object", - "description": "Text Customized categories.", - "properties": { - "categoryName": { - "type": "string", - "description": "Text customizedCategories name.", - "maxLength": 64, - "pattern": "^Customized_[0-9A-Za-z._~-]+$", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "preDefinedConcepts": { - "type": "array", - "items": { - "$ref": "#/definitions/PreDefinedConcept" - }, - "x-ms-identifiers": [] - }, - "subCategories": { - "type": "array", - "items": { - "$ref": "#/definitions/SubCategory" - } - }, - "emphases": { - "type": "array", - "items": { - "type": "string" - } - }, - "exampleBlobUrl": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "categoryName", - "subCategories" - ] - }, - "TextIncident": { - "type": "object", - "description": "Text Incident.", - "properties": { - "incidentName": { - "type": "string", - "description": "incident name.", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "description": { - "type": "string", - "description": "Incident description.", - "maxLength": 1024 - }, - "created": { - "type": "string", - "format": "date-time", - "description": "Incident created time.", - "x-ms-mutability": [ - "read" - ] - }, - "lastUpdated": { - "type": "string", - "format": "date-time", - "description": "Incident updated time.", - "x-ms-mutability": [ - "read" - ] - } - }, - "required": [ - "incidentName", - "created", - "lastUpdated" - ] - }, - "TextIncidentCreateOrUpdate": { - "type": "object", - "description": "Text Incident.", - "properties": { - "incidentName": { - "type": "string", - "description": "incident name.", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "description": { - "type": "string", - "description": "Incident description.", - "maxLength": 1024 - } - } - }, - "TextIncidentSample": { - "type": "object", - "description": "Sample in a Text Incident.", - "properties": { - "incidentSampleId": { - "type": "string", - "description": "incident name.", - "maxLength": 64, - "readOnly": true - }, - "text": { - "type": "string", - "description": "IncidentSample text content.", - "maxLength": 1024 - } - }, - "required": [ - "incidentSampleId" - ] - }, - "UngroundedDetails": { - "type": "object", - "description": "The detailed information about a text identified as ungrounded.", - "properties": { - "text": { - "type": "string", - "description": "The ungrounded text." - }, - "reason": { - "type": "string", - "description": "The explanation for identifying the text as ungrounded. \nOnly when the 'reasoning' field in the input is set to true 'reason' field will be returned." - } - }, - "required": [ - "text" - ] - } - }, - "parameters": { - "Azure.Core.Foundations.ApiVersionParameter": { - "name": "api-version", - "in": "query", - "description": "The API version to use for this operation.", - "required": true, - "type": "string", - "minLength": 1, - "x-ms-parameter-location": "method", - "x-ms-client-name": "apiVersion" - }, - "Azure.Core.MaxPageSizeQueryParameter": { - "name": "maxpagesize", - "in": "query", - "description": "The maximum number of result items per page.", - "required": false, - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method" - }, - "Azure.Core.SkipQueryParameter": { - "name": "skip", - "in": "query", - "description": "The number of result items to skip.", - "required": false, - "type": "integer", - "format": "int32", - "default": 0, - "x-ms-parameter-location": "method" - }, - "Azure.Core.TopQueryParameter": { - "name": "top", - "in": "query", - "description": "The number of result items to return.", - "required": false, - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method" - } - } -}