From e0ea9385613106f713aa040aa74b050792b2dcb8 Mon Sep 17 00:00:00 2001 From: Yuxiao Wang Date: Fri, 19 Jan 2024 16:04:23 +0800 Subject: [PATCH 1/2] fix explanation version --- .../cognitiveservices/ContentSafety/main.tsp | 3 - .../ContentSafety/models.tsp | 44 +- .../ContentSafety/routes.tsp | 12 +- .../2023-10-30-preview/contentsafety.json | 1009 ++++++++++++++--- 4 files changed, 859 insertions(+), 209 deletions(-) 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 cda5c76d1d8e..aa7bdc833a85 100644 --- a/specification/cognitiveservices/ContentSafety/models.tsp +++ b/specification/cognitiveservices/ContentSafety/models.tsp @@ -40,7 +40,7 @@ enum AnalyzeImageOutputType { FourSeverityLevels, } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) @doc("The type of batch results storage mode.") enum BatchResultsStorageMode { @doc("Merge each result into one file.") @@ -50,7 +50,7 @@ enum BatchResultsStorageMode { IndividualResultFiles, } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) @doc("The type of batch analysis task status.") enum BatchTaskStatus { @doc("The task has not started yet.") @@ -66,7 +66,7 @@ enum BatchTaskStatus { Succeeded, } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) enum ModelStatus { Created, Training, @@ -74,7 +74,7 @@ enum ModelStatus { Failed, } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) enum GeneratePromptStatus { Running, Ready, @@ -103,12 +103,12 @@ model AnalyzeTextOptions { @doc("The incidents to detect.") incidents?: IncidentOptions; - @added(ContentSafety.Versions.v2024_01_30_Preview) + @added(ContentSafety.Versions.v2023_10_30_Preview) @doc("The customized categories will be analyzed. If they are not assigned, the analysis results for all available customized categories will be returned.") customizedCategories?: CustomizedCategory[]; } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) @doc("Customized category for inference.") model CustomizedCategory { @doc("Category name") @@ -140,16 +140,16 @@ 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[]; - @added(ContentSafety.Versions.v2024_01_30_Preview) + @added(ContentSafety.Versions.v2023_10_30_Preview) @doc("Analysis result for customized categories.") customizedCategoriesAnalysis: TextCustomizedCategoryAnalysis[]; } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) @doc("Text customized category analysis result.") model TextCustomizedCategoryAnalysis { @doc("Customized category name") @@ -159,12 +159,12 @@ model TextCustomizedCategoryAnalysis { customizedCategoriesAnalysis: TextCustomizedCategoryClassResult[]; } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) @doc("customized category analysis result") model TextCustomizedCategoryClassResult { id: int32; - @renamedFrom(Versions.v2024_01_30_Preview, "name") + @renamedFrom(Versions.v2023_10_30_Preview, "name") className: string; } @@ -247,7 +247,7 @@ model ImageCategoriesAnalysis { severity?: int32; } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) @doc("The image batch analysis request.") model BatchAnalyzeImagesOptions { @doc("The URL of the Azure Storage Blob containing all the images to be analyzed in the batch task.") @@ -269,7 +269,7 @@ model BatchAnalyzeImagesOptions { incidents?: IncidentOptions; } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) @doc("Image batch analyze task.") @resource("image/batchAnalyzeTasks") model ImageBatchTaskDetail { @@ -579,11 +579,11 @@ model PreDefinedConcept { @added(Versions.v2023_10_30_Preview) @doc("Label definition.") -@renamedFrom(Versions.v2024_01_30_Preview, "SubCategory") +@renamedFrom(Versions.v2023_10_30_Preview, "SubCategory") model Class { id: int32; - @renamedFrom(Versions.v2024_01_30_Preview, "name") + @renamedFrom(Versions.v2023_10_30_Preview, "name") className: string; statements: string[]; @@ -602,22 +602,22 @@ model TextCustomizedCategory { @doc("A predefined concept with its definition can be used directly in the subcategories.") @added(Versions.v2023_10_30_Preview) - @removed(Versions.v2024_01_30_Preview) + @removed(Versions.v2023_10_30_Preview) preDefinedConcepts?: PreDefinedConcept[]; @doc("Subcategories are detailed classes of the category. It is required there is a class 'safe' with id=0.") - @renamedFrom(Versions.v2024_01_30_Preview, "subCategories") + @renamedFrom(Versions.v2023_10_30_Preview, "subCategories") classes: Class[]; @added(Versions.v2023_10_30_Preview) - @removed(Versions.v2024_01_30_Preview) + @removed(Versions.v2023_10_30_Preview) emphases?: string[]; @doc("Blob that stores the examples.") exampleBlobUrl?: url; } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) @doc("The response for async training triggering.") model SubmitModelTrainingResponse { ...AcceptedResponse; @@ -627,13 +627,13 @@ model SubmitModelTrainingResponse { modelUrl: string; } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) model AsyncJobWarning { code: string; messgae: string; } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) @resource("text/generatePromptTasks") model GeneratePromptTaskDetail { @doc("The id of image batch analysis task.") @@ -659,7 +659,7 @@ enum ImageWithTextCategory { Violence, } -@added(ContentSafety.Versions.v2024_01_30_Preview) +@added(ContentSafety.Versions.v2023_10_30_Preview) @parentResource(TextCustomizedCategory) @resource("models") model TextTrainedModel { diff --git a/specification/cognitiveservices/ContentSafety/routes.tsp b/specification/cognitiveservices/ContentSafety/routes.tsp index e68ebcbed8a6..4735ecf3e324 100644 --- a/specification/cognitiveservices/ContentSafety/routes.tsp +++ b/specification/cognitiveservices/ContentSafety/routes.tsp @@ -82,7 +82,7 @@ interface ImageOperations { } interface ImageBatchOperations { - @added(ContentSafety.Versions.v2024_01_30_Preview) + @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:batchAnalyze") @@ -95,7 +95,7 @@ interface ImageBatchOperations { ImageBatchTaskDetail >; - @added(ContentSafety.Versions.v2024_01_30_Preview) + @added(ContentSafety.Versions.v2023_10_30_Preview) @summary("Get Batch Analyze Status") @doc("Check the status of a batch image analysis task.") getBatchTaskStatus is Azure.Core.ResourceRead; @@ -326,7 +326,7 @@ interface TextCategoryCustomization { ListQueryParametersTrait >; - @added(Versions.v2024_01_30_Preview) + @added(Versions.v2023_10_30_Preview) @action("trainModel") trainModel is CategoryOps.ResourceAction< TextCustomizedCategory, @@ -334,7 +334,7 @@ interface TextCategoryCustomization { SubmitModelTrainingResponse >; - @added(ContentSafety.Versions.v2024_01_30_Preview) + @added(ContentSafety.Versions.v2023_10_30_Preview) @route("/text/categories/{categoryName}:generatePrompt") @post @summary("Trigger prompt generation") @@ -348,7 +348,7 @@ interface TextCategoryCustomization { GeneratePromptTaskDetail >; - @added(ContentSafety.Versions.v2024_01_30_Preview) + @added(ContentSafety.Versions.v2023_10_30_Preview) @summary("Get Generate Prompt Task Status") @doc("Check the status of a generate prompt task.") getGeneratePromptTaskStatus is Azure.Core.ResourceRead; @@ -359,7 +359,7 @@ interface TextCustomizedMdoelOps NoConditionalRequests & NoClientRequestId> {} -@added(Versions.v2024_01_30_Preview) +@added(Versions.v2023_10_30_Preview) interface TextCustomizedModelOperations { @summary("List all existing models") @doc("List existing models.") diff --git a/specification/cognitiveservices/data-plane/ContentSafety/preview/2023-10-30-preview/contentsafety.json b/specification/cognitiveservices/data-plane/ContentSafety/preview/2023-10-30-preview/contentsafety.json index 9d0aad9dfe01..95d30e1a4d91 100644 --- a/specification/cognitiveservices/data-plane/ContentSafety/preview/2023-10-30-preview/contentsafety.json +++ b/specification/cognitiveservices/data-plane/ContentSafety/preview/2023-10-30-preview/contentsafety.json @@ -59,6 +59,46 @@ }, "tags": [], "paths": { + "/image/batchAnalyzeTasks/{taskId}": { + "get": { + "operationId": "ImageBatchOperations_GetBatchTaskStatus", + "summary": "Get Batch Analyze Status", + "description": "Check the status of a batch image analysis task.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "taskId", + "in": "path", + "description": "The id of image batch analysis task.", + "required": true, + "type": "string", + "maxLength": 64 + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ImageBatchTaskDetail" + } + }, + "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": { "get": { "operationId": "ImageIncidents_ListIncidents", @@ -480,6 +520,47 @@ } } }, + "/image:batchAnalyze": { + "post": { + "operationId": "ImageBatchOperations_BatchAnalyzeImage", + "summary": "Start Batch Analyze Images", + "description": "An asynchronous API for the batch 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 batch analysis request.", + "required": true, + "schema": { + "$ref": "#/definitions/BatchAnalyzeImagesOptions" + } + } + ], + "responses": { + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "schema": { + "$ref": "#/definitions/ImageBatchTaskDetail" + } + }, + "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", @@ -1100,30 +1181,32 @@ } } }, - "/text/incidents": { - "get": { - "operationId": "TextIncidents_ListIncidents", - "summary": "Get All Text Incidents", - "description": "Get all incidents details.", + "/text/categories/{categoryName}:trainModel": { + "post": { + "operationId": "TextCategoryCustomization_TrainModel", + "description": "Resource action operation template.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "#/parameters/Azure.Core.TopQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.SkipQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" + "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/PagedTextIncident" + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "headers": { + "operation-location": { + "type": "string", + "description": "The location of the status API for monitoring the triggered model." + } } }, "default": { @@ -1138,36 +1221,31 @@ } } } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, - "/text/incidents/{incidentName}": { - "get": { - "operationId": "TextIncidents_GetIncidents", - "summary": "Get Text Incident By incidentName", - "description": "Returns text incident details.", + "/text/categories/{categoryName}:generatePrompt": { + "post": { + "operationId": "TextCategoryCustomization_GenerateCustomizedCategoryPrompt", + "summary": "Trigger prompt generation", + "description": "An asynchronous API to generate prompt from customized category.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "incidentName", + "name": "categoryName", "in": "path", - "description": "incident name.", + "description": "The customized category name.", "required": true, - "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" + "type": "string" } ], "responses": { - "200": { - "description": "The request has succeeded.", + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", "schema": { - "$ref": "#/definitions/TextIncident" + "$ref": "#/definitions/GeneratePromptTaskDetail" } }, "default": { @@ -1183,48 +1261,41 @@ } } } - }, - "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" - ], + } + }, + "/text/categories/{categoryName}/models": { + "get": { + "operationId": "TextCustomizedModelOperations_ListTextCustomizedModels", + "summary": "List all existing models", + "description": "List existing models.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "incidentName", + "name": "categoryName", "in": "path", - "description": "incident name.", + "description": "Text customizedCategories name.", "required": true, "type": "string", "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" + "pattern": "^Customized_[0-9A-Za-z._~-]+$" }, { - "name": "resource", - "in": "body", - "description": "The resource instance.", - "required": true, - "schema": { - "$ref": "#/definitions/TextIncidentCreateOrUpdate" - } + "$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/TextIncident" - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "schema": { - "$ref": "#/definitions/TextIncident" + "$ref": "#/definitions/PagedTextTrainedModel" } }, "default": { @@ -1239,29 +1310,42 @@ } } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } - }, - "delete": { - "operationId": "TextIncidents_DeleteIncident", - "summary": "Delete Text Incident By incidentName", - "description": "Deletes a text incident.", + } + }, + "/text/categories/{categoryName}/models/{modelId}": { + "get": { + "operationId": "TextCustomizedModelOperations_GetTextCustomizedModels", + "description": "Get a model that is not deleted.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "incidentName", + "name": "categoryName", "in": "path", - "description": "incident name.", + "description": "Text customizedCategories name.", "required": true, "type": "string", "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" + "pattern": "^Customized_[0-9A-Za-z._~-]+$" + }, + { + "name": "modelId", + "in": "path", + "required": true, + "type": "string" } ], "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/TextTrainedModel" + } }, "default": { "description": "An unexpected error response.", @@ -1276,41 +1360,33 @@ } } } - } - }, - "/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.", + }, + "delete": { + "operationId": "TextCustomizedModelOperations_DeleteCustomizedModel", + "description": "If the model is training, the training process will be cancelled and the model will also be deleted.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "incidentName", + "name": "categoryName", "in": "path", - "description": "incident name.", + "description": "Text customizedCategories name.", "required": true, "type": "string", "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" + "pattern": "^Customized_[0-9A-Za-z._~-]+$" }, { - "name": "body", - "in": "body", + "name": "modelId", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/AddTextIncidentSamplesOptions" - } + "type": "string" } ], "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/AddTextIncidentSamplesResult" - } + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " }, "default": { "description": "An unexpected error response.", @@ -1327,36 +1403,30 @@ } } }, - "/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.", + "/text/generatePromptTasks/{taskId}": { + "get": { + "operationId": "TextCategoryCustomization_GetGeneratePromptTaskStatus", + "summary": "Get Generate Prompt Task Status", + "description": "Check the status of a generate prompt task.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "incidentName", + "name": "taskId", "in": "path", - "description": "incident name.", + "description": "The id of image batch analysis task.", "required": true, "type": "string", - "maxLength": 64, - "pattern": "^[0-9A-Za-z._~-]+$" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RemoveTextIncidentSamplesOptions" - } + "maxLength": 64 } ], "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/GeneratePromptTaskDetail" + } }, "default": { "description": "An unexpected error response.", @@ -1373,24 +1443,15 @@ } } }, - "/text/incidents/{incidentName}/incidentSamples": { + "/text/incidents": { "get": { - "operationId": "TextIncidents_ListIncidentSamples", - "summary": "Get All TextIncidentSamples By textIncidentName", - "description": "Get all TextIncidentSamples in a text incident.", + "operationId": "TextIncidents_ListIncidents", + "summary": "Get All Text Incidents", + "description": "Get all incidents 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._~-]+$" - }, { "$ref": "#/parameters/Azure.Core.TopQueryParameter" }, @@ -1405,7 +1466,7 @@ "200": { "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/PagedTextIncidentSample" + "$ref": "#/definitions/PagedTextIncident" } }, "default": { @@ -1426,12 +1487,294 @@ } } }, - "/text/incidents/{incidentName}/incidentSamples/{incidentSampleId}": { + "/text/incidents/{incidentName}": { "get": { - "operationId": "TextIncidents_GetIncidentSample", - "summary": "Get TextIncidentSample By textIncidentName And textIncidentSampleId", - "description": "Get textIncidentSample by textIncidentName and textIncidentSampleId from a text incident.", - "parameters": [ + "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" }, @@ -1970,6 +2313,14 @@ "incidents": { "$ref": "#/definitions/IncidentOptions", "description": "The incidents to detect." + }, + "customizedCategories": { + "type": "array", + "description": "The customized categories will be analyzed. If they are not assigned, the analysis results for all available customized categories will be returned.", + "items": { + "$ref": "#/definitions/CustomizedCategory" + }, + "x-ms-identifiers": [] } }, "required": [ @@ -2047,17 +2398,33 @@ }, "x-ms-identifiers": [] }, - "incidentMatches": { + "incidentMatches": { + "type": "array", + "description": "The incident match details.", + "items": { + "$ref": "#/definitions/IncidentMatch" + }, + "x-ms-identifiers": [] + }, + "citation": { "type": "array", - "description": "The incident match details.", + "description": "Chunks in the original text detected as harmful content. Analysis result and scores are caused by these.", "items": { - "$ref": "#/definitions/IncidentMatch" + "type": "string" + } + }, + "customizedCategoriesAnalysis": { + "type": "array", + "description": "Analysis result for customized categories.", + "items": { + "$ref": "#/definitions/TextCustomizedCategoryAnalysis" }, "x-ms-identifiers": [] } }, "required": [ - "categoriesAnalysis" + "categoriesAnalysis", + "customizedCategoriesAnalysis" ] }, "AnnotateTextOptions": { @@ -2102,6 +2469,21 @@ "name" ] }, + "AsyncJobWarning": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "messgae": { + "type": "string" + } + }, + "required": [ + "code", + "messgae" + ] + }, "Azure.Core.Foundations.Error": { "type": "object", "description": "The error object.", @@ -2163,6 +2545,149 @@ } } }, + "BatchAnalyzeImagesOptions": { + "type": "object", + "description": "The image batch analysis request.", + "properties": { + "imagesBlobFolderUrl": { + "type": "string", + "format": "uri", + "description": "The URL of the Azure Storage Blob containing all the images to be analyzed in the batch task." + }, + "analysisResultsBlobFolderUrl": { + "type": "string", + "format": "uri", + "description": "The URL of the Azure Storage Blob where the batch task results will be written." + }, + "resultsStorageMode": { + "$ref": "#/definitions/BatchResultsStorageMode", + "description": "The storage mode for the batch task results, either 'CollectiveResultFile' or 'IndividualResultFiles'.", + "default": "CollectiveResultFile" + }, + "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": [ + "imagesBlobFolderUrl", + "analysisResultsBlobFolderUrl" + ] + }, + "BatchResultsStorageMode": { + "type": "string", + "description": "The type of batch results storage mode.", + "enum": [ + "CollectiveResultFile", + "IndividualResultFiles" + ], + "x-ms-enum": { + "name": "BatchResultsStorageMode", + "modelAsString": true, + "values": [ + { + "name": "CollectiveResultFile", + "value": "CollectiveResultFile", + "description": "Merge each result into one file." + }, + { + "name": "IndividualResultFiles", + "value": "IndividualResultFiles", + "description": "Store each result in a single file." + } + ] + } + }, + "BatchTaskStatus": { + "type": "string", + "description": "The type of batch analysis task status.", + "enum": [ + "NotStarted", + "Running", + "Failed", + "Succeeded" + ], + "x-ms-enum": { + "name": "BatchTaskStatus", + "modelAsString": true, + "values": [ + { + "name": "NotStarted", + "value": "NotStarted", + "description": "The task has not started yet." + }, + { + "name": "Running", + "value": "Running", + "description": "The task is in progress." + }, + { + "name": "Failed", + "value": "Failed", + "description": "The task has failed." + }, + { + "name": "Succeeded", + "value": "Succeeded", + "description": "The task has been succeeded." + } + ] + } + }, + "Class": { + "type": "object", + "description": "Label definition.", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "className": { + "type": "string" + }, + "statements": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "className", + "statements" + ] + }, + "CustomizedCategory": { + "type": "object", + "description": "Customized category for inference.", + "properties": { + "categoryName": { + "type": "string", + "description": "Category name" + }, + "modelId": { + "type": "string", + "description": "Model ID for the category. If not provided, the latest available model will be used." + } + }, + "required": [ + "categoryName", + "modelId" + ] + }, "DetectUngroundednessOptions": { "type": "object", "description": "The request of ungroundedness detection.", @@ -2250,6 +2775,41 @@ "modelAsString": true } }, + "GeneratePromptStatus": { + "type": "string", + "enum": [ + "Running", + "Ready", + "Failed" + ], + "x-ms-enum": { + "name": "GeneratePromptStatus", + "modelAsString": true + } + }, + "GeneratePromptTaskDetail": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "description": "The id of image batch analysis task.", + "maxLength": 64, + "readOnly": true + }, + "status": { + "$ref": "#/definitions/GeneratePromptStatus", + "description": "The status of the batch image analysis task." + }, + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "Return error detail when the task failed." + } + }, + "required": [ + "taskId", + "status" + ] + }, "GptResource": { "type": "object", "description": "Connection details for the GPT resource.", @@ -2268,6 +2828,42 @@ "deploymentName" ] }, + "ImageBatchTaskDetail": { + "type": "object", + "description": "Image batch analyze task.", + "properties": { + "taskId": { + "type": "string", + "description": "The id of image batch analysis task.", + "maxLength": 64, + "readOnly": true + }, + "status": { + "$ref": "#/definitions/BatchTaskStatus", + "description": "The status of the batch image analysis task." + }, + "progressPercentage": { + "type": "number", + "format": "double", + "description": "The progress of the batch image analysis task, represented as a percentage (0-100)." + }, + "taskCreatedTime": { + "type": "string", + "format": "date-time", + "description": "The timestamp of when batch image analysis task was created." + }, + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "Return error detail when the task failed." + } + }, + "required": [ + "taskId", + "status", + "progressPercentage", + "taskCreatedTime" + ] + }, "ImageCategoriesAnalysis": { "type": "object", "description": "Image analysis result.", @@ -2519,6 +3115,19 @@ "incidentSampleId" ] }, + "ModelStatus": { + "type": "string", + "enum": [ + "Created", + "Training", + "Ready", + "Failed" + ], + "x-ms-enum": { + "name": "ModelStatus", + "modelAsString": true + } + }, "PagedImageIncident": { "type": "object", "description": "Paged collection of ImageIncident items", @@ -2673,20 +3282,26 @@ "value" ] }, - "PreDefinedConcept": { + "PagedTextTrainedModel": { "type": "object", - "description": "Pre-defined concept.", + "description": "Paged collection of TextTrainedModel items", "properties": { - "concept": { - "type": "string" + "value": { + "type": "array", + "description": "The TextTrainedModel items on this page", + "items": { + "$ref": "#/definitions/TextTrainedModel" + }, + "x-ms-identifiers": [] }, - "description": { - "type": "string" + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" } }, "required": [ - "concept", - "description" + "value" ] }, "ProtectedMaterialAnalysisResult": { @@ -2750,30 +3365,6 @@ "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.", @@ -2929,25 +3520,11 @@ "create" ] }, - "preDefinedConcepts": { - "type": "array", - "description": "A predefined concept with its definition can be used directly in the subcategories.", - "items": { - "$ref": "#/definitions/PreDefinedConcept" - }, - "x-ms-identifiers": [] - }, - "subCategories": { + "classes": { "type": "array", "description": "Subcategories are detailed classes of the category. It is required there is a class 'safe' with id=0.", "items": { - "$ref": "#/definitions/SubCategory" - } - }, - "emphases": { - "type": "array", - "items": { - "type": "string" + "$ref": "#/definitions/Class" } }, "exampleBlobUrl": { @@ -2958,7 +3535,45 @@ }, "required": [ "categoryName", - "subCategories" + "classes" + ] + }, + "TextCustomizedCategoryAnalysis": { + "type": "object", + "description": "Text customized category analysis result.", + "properties": { + "categoryName": { + "type": "string", + "description": "Customized category name" + }, + "customizedCategoriesAnalysis": { + "type": "array", + "description": "customized category analysis", + "items": { + "$ref": "#/definitions/TextCustomizedCategoryClassResult" + } + } + }, + "required": [ + "categoryName", + "customizedCategoriesAnalysis" + ] + }, + "TextCustomizedCategoryClassResult": { + "type": "object", + "description": "customized category analysis result", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "className": { + "type": "string" + } + }, + "required": [ + "id", + "className" ] }, "TextIncident": { @@ -3044,6 +3659,44 @@ "incidentSampleId" ] }, + "TextTrainedModel": { + "type": "object", + "properties": { + "modelId": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/ModelStatus" + }, + "createdTime": { + "type": "string", + "format": "date-time" + }, + "lastUpdateTime": { + "type": "string", + "format": "date-time" + }, + "warnings": { + "type": "array", + "items": { + "$ref": "#/definitions/AsyncJobWarning" + }, + "x-ms-identifiers": [] + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "modelId", + "status", + "createdTime", + "lastUpdateTime" + ] + }, "UngroundedDetails": { "type": "object", "description": "The detailed information about a text identified as ungrounded.", From ede7c881858ee512a4997538a3e43396b3098f4d Mon Sep 17 00:00:00 2001 From: Yuxiao Wang Date: Fri, 19 Jan 2024 16:44:12 +0800 Subject: [PATCH 2/2] delete 0130 version --- .../2024-01-30-preview/contentsafety.json | 3708 ----------------- 1 file changed, 3708 deletions(-) delete mode 100644 specification/cognitiveservices/data-plane/ContentSafety/preview/2024-01-30-preview/contentsafety.json diff --git a/specification/cognitiveservices/data-plane/ContentSafety/preview/2024-01-30-preview/contentsafety.json b/specification/cognitiveservices/data-plane/ContentSafety/preview/2024-01-30-preview/contentsafety.json deleted file mode 100644 index c6c39ee3ff11..000000000000 --- a/specification/cognitiveservices/data-plane/ContentSafety/preview/2024-01-30-preview/contentsafety.json +++ /dev/null @@ -1,3708 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "ContentSafety Service", - "version": "2024-01-30-preview", - "description": "Analyze harmful content", - "x-typespec-generated": [ - { - "emitter": "@azure-tools/typespec-autorest" - } - ] - }, - "schemes": [ - "https" - ], - "x-ms-parameterized-host": { - "hostTemplate": "{endpoint}/contentsafety", - "useSchemePrefix": false, - "parameters": [ - { - "name": "endpoint", - "in": "path", - "description": "Supported Cognitive Services endpoints (protocol and hostname, for example:\nhttps://.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/batchAnalyzeTasks/{taskId}": { - "get": { - "operationId": "ImageBatchOperations_GetBatchTaskStatus", - "summary": "Get Batch Analyze Status", - "description": "Check the status of a batch image analysis task.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "taskId", - "in": "path", - "description": "The id of image batch analysis task.", - "required": true, - "type": "string", - "maxLength": 64 - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/ImageBatchTaskDetail" - } - }, - "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": { - "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." - } - } - } - } - } - }, - "/image:batchAnalyze": { - "post": { - "operationId": "ImageBatchOperations_BatchAnalyzeImage", - "summary": "Start Batch Analyze Images", - "description": "An asynchronous API for the batch 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 batch analysis request.", - "required": true, - "schema": { - "$ref": "#/definitions/BatchAnalyzeImagesOptions" - } - } - ], - "responses": { - "202": { - "description": "The request has been accepted for processing, but processing has not yet completed.", - "schema": { - "$ref": "#/definitions/ImageBatchTaskDetail" - } - }, - "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/categories/{categoryName}:trainModel": { - "post": { - "operationId": "TextCategoryCustomization_TrainModel", - "description": "Resource action 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": { - "202": { - "description": "The request has been accepted for processing, but processing has not yet completed.", - "headers": { - "operation-location": { - "type": "string", - "description": "The location of the status API for monitoring the triggered model." - } - } - }, - "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/{categoryName}:generatePrompt": { - "post": { - "operationId": "TextCategoryCustomization_GenerateCustomizedCategoryPrompt", - "summary": "Trigger prompt generation", - "description": "An asynchronous API to generate prompt from customized category.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "categoryName", - "in": "path", - "description": "The customized category name.", - "required": true, - "type": "string" - } - ], - "responses": { - "202": { - "description": "The request has been accepted for processing, but processing has not yet completed.", - "schema": { - "$ref": "#/definitions/GeneratePromptTaskDetail" - } - }, - "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/{categoryName}/models": { - "get": { - "operationId": "TextCustomizedModelOperations_ListTextCustomizedModels", - "summary": "List all existing models", - "description": "List existing models.", - "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._~-]+$" - }, - { - "$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/PagedTextTrainedModel" - } - }, - "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}/models/{modelId}": { - "get": { - "operationId": "TextCustomizedModelOperations_GetTextCustomizedModels", - "description": "Get a model that is not deleted.", - "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": "modelId", - "in": "path", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/TextTrainedModel" - } - }, - "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": "TextCustomizedModelOperations_DeleteCustomizedModel", - "description": "If the model is training, the training process will be cancelled and the model will also be deleted.", - "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": "modelId", - "in": "path", - "required": true, - "type": "string" - } - ], - "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/generatePromptTasks/{taskId}": { - "get": { - "operationId": "TextCategoryCustomization_GetGeneratePromptTaskStatus", - "summary": "Get Generate Prompt Task Status", - "description": "Check the status of a generate prompt task.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "taskId", - "in": "path", - "description": "The id of image batch analysis task.", - "required": true, - "type": "string", - "maxLength": 64 - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/GeneratePromptTaskDetail" - } - }, - "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." - }, - "customizedCategories": { - "type": "array", - "description": "The customized categories will be analyzed. If they are not assigned, the analysis results for all available customized categories will be returned.", - "items": { - "$ref": "#/definitions/CustomizedCategory" - }, - "x-ms-identifiers": [] - } - }, - "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" - } - }, - "customizedCategoriesAnalysis": { - "type": "array", - "description": "Analysis result for customized categories.", - "items": { - "$ref": "#/definitions/TextCustomizedCategoryAnalysis" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "categoriesAnalysis", - "customizedCategoriesAnalysis" - ] - }, - "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" - ] - }, - "AsyncJobWarning": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "messgae": { - "type": "string" - } - }, - "required": [ - "code", - "messgae" - ] - }, - "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." - } - } - }, - "BatchAnalyzeImagesOptions": { - "type": "object", - "description": "The image batch analysis request.", - "properties": { - "imagesBlobFolderUrl": { - "type": "string", - "format": "uri", - "description": "The URL of the Azure Storage Blob containing all the images to be analyzed in the batch task." - }, - "analysisResultsBlobFolderUrl": { - "type": "string", - "format": "uri", - "description": "The URL of the Azure Storage Blob where the batch task results will be written." - }, - "resultsStorageMode": { - "$ref": "#/definitions/BatchResultsStorageMode", - "description": "The storage mode for the batch task results, either 'CollectiveResultFile' or 'IndividualResultFiles'.", - "default": "CollectiveResultFile" - }, - "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": [ - "imagesBlobFolderUrl", - "analysisResultsBlobFolderUrl" - ] - }, - "BatchResultsStorageMode": { - "type": "string", - "description": "The type of batch results storage mode.", - "enum": [ - "CollectiveResultFile", - "IndividualResultFiles" - ], - "x-ms-enum": { - "name": "BatchResultsStorageMode", - "modelAsString": true, - "values": [ - { - "name": "CollectiveResultFile", - "value": "CollectiveResultFile", - "description": "Merge each result into one file." - }, - { - "name": "IndividualResultFiles", - "value": "IndividualResultFiles", - "description": "Store each result in a single file." - } - ] - } - }, - "BatchTaskStatus": { - "type": "string", - "description": "The type of batch analysis task status.", - "enum": [ - "NotStarted", - "Running", - "Failed", - "Succeeded" - ], - "x-ms-enum": { - "name": "BatchTaskStatus", - "modelAsString": true, - "values": [ - { - "name": "NotStarted", - "value": "NotStarted", - "description": "The task has not started yet." - }, - { - "name": "Running", - "value": "Running", - "description": "The task is in progress." - }, - { - "name": "Failed", - "value": "Failed", - "description": "The task has failed." - }, - { - "name": "Succeeded", - "value": "Succeeded", - "description": "The task has been succeeded." - } - ] - } - }, - "Class": { - "type": "object", - "description": "Label definition.", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "className": { - "type": "string" - }, - "statements": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "id", - "className", - "statements" - ] - }, - "CustomizedCategory": { - "type": "object", - "description": "Customized category for inference.", - "properties": { - "categoryName": { - "type": "string", - "description": "Category name" - }, - "modelId": { - "type": "string", - "description": "Model ID for the category. If not provided, the latest available model will be used." - } - }, - "required": [ - "categoryName", - "modelId" - ] - }, - "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 - } - }, - "GeneratePromptStatus": { - "type": "string", - "enum": [ - "Running", - "Ready", - "Failed" - ], - "x-ms-enum": { - "name": "GeneratePromptStatus", - "modelAsString": true - } - }, - "GeneratePromptTaskDetail": { - "type": "object", - "properties": { - "taskId": { - "type": "string", - "description": "The id of image batch analysis task.", - "maxLength": 64, - "readOnly": true - }, - "status": { - "$ref": "#/definitions/GeneratePromptStatus", - "description": "The status of the batch image analysis task." - }, - "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "Return error detail when the task failed." - } - }, - "required": [ - "taskId", - "status" - ] - }, - "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" - ] - }, - "ImageBatchTaskDetail": { - "type": "object", - "description": "Image batch analyze task.", - "properties": { - "taskId": { - "type": "string", - "description": "The id of image batch analysis task.", - "maxLength": 64, - "readOnly": true - }, - "status": { - "$ref": "#/definitions/BatchTaskStatus", - "description": "The status of the batch image analysis task." - }, - "progressPercentage": { - "type": "number", - "format": "double", - "description": "The progress of the batch image analysis task, represented as a percentage (0-100)." - }, - "taskCreatedTime": { - "type": "string", - "format": "date-time", - "description": "The timestamp of when batch image analysis task was created." - }, - "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "Return error detail when the task failed." - } - }, - "required": [ - "taskId", - "status", - "progressPercentage", - "taskCreatedTime" - ] - }, - "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" - ] - }, - "ModelStatus": { - "type": "string", - "enum": [ - "Created", - "Training", - "Ready", - "Failed" - ], - "x-ms-enum": { - "name": "ModelStatus", - "modelAsString": true - } - }, - "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" - ] - }, - "PagedTextTrainedModel": { - "type": "object", - "description": "Paged collection of TextTrainedModel items", - "properties": { - "value": { - "type": "array", - "description": "The TextTrainedModel items on this page", - "items": { - "$ref": "#/definitions/TextTrainedModel" - }, - "x-ms-identifiers": [] - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, - "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" - ] - }, - "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" - ] - }, - "classes": { - "type": "array", - "description": "Subcategories are detailed classes of the category. It is required there is a class 'safe' with id=0.", - "items": { - "$ref": "#/definitions/Class" - } - }, - "exampleBlobUrl": { - "type": "string", - "format": "uri", - "description": "Blob that stores the examples." - } - }, - "required": [ - "categoryName", - "classes" - ] - }, - "TextCustomizedCategoryAnalysis": { - "type": "object", - "description": "Text customized category analysis result.", - "properties": { - "categoryName": { - "type": "string", - "description": "Customized category name" - }, - "customizedCategoriesAnalysis": { - "type": "array", - "description": "customized category analysis", - "items": { - "$ref": "#/definitions/TextCustomizedCategoryClassResult" - } - } - }, - "required": [ - "categoryName", - "customizedCategoriesAnalysis" - ] - }, - "TextCustomizedCategoryClassResult": { - "type": "object", - "description": "customized category analysis result", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "className": { - "type": "string" - } - }, - "required": [ - "id", - "className" - ] - }, - "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" - ] - }, - "TextTrainedModel": { - "type": "object", - "properties": { - "modelId": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/ModelStatus" - }, - "createdTime": { - "type": "string", - "format": "date-time" - }, - "lastUpdateTime": { - "type": "string", - "format": "date-time" - }, - "warnings": { - "type": "array", - "items": { - "$ref": "#/definitions/AsyncJobWarning" - }, - "x-ms-identifiers": [] - }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "modelId", - "status", - "createdTime", - "lastUpdateTime" - ] - }, - "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" - } - } -}