你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Reviews.CreateJobWithHttpMessagesAsync 方法

定义

将为此终结点上发布的内容返回作业 ID。

根据工作流评估内容后,将基于工作流表达式创建或忽略评审。

<h3>CallBack 架构 </h3>

<p><h4>作业完成调用回拨示例</h4><br/>

{<br/> “JobId”: “<Job Id>,<br/> ”ReviewId“: ”<Review Id, 如果作业导致要创建>审阅“,<br/> ”WorkFlowId“: ”default“,<br/> ”Status“: ”<这是 Complete, InProgress, Error>“,<br/> ”ContentType“: ”Image“,<br/> ”ContentId“: ”<这是在 input> 上指定的 ContentId“,<br/> ”CallBackType“: ”Job“,<br/> ”Metadata“: {<br/> ”adultscore“:”0.xxx“,<br/> ”a“: ”False“,<br/> ”racyscore“: ”0.xxx“,<br/> ”r“: ”True“<br/> }<br/ }br/> }<br/>

</p><p><h4>审阅完成调用回拨示例</h4><br/>

{ “ReviewId”:<评论 Id>“,<br/> ”ModifiedOn“: ”2016-10-11T22:36:32.9934851Z“,<br/> ”ModifiedBy“: ”<审阅者>的名称“,<br/> ”CallBackType“: ”Review“,<br/> ”ContentId“: ”<指定输入>的 ContentId“,<br/> ”Metadata“: {<br/> ”adultscore“: ”0.xxx“, ”a“: ”False“,<br/> ”racyscore“: ”0.xxx“,<br/> ”r“: ”True“<br/> },<br/> ”ReviewerResultTags“: {<br/> ”a“: ”False“,<br/> ”r“: ”True“<br/> }<br/> }<br/>

</p>.

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.JobId>> CreateJobWithHttpMessagesAsync (string teamName, string contentType, string contentId, string workflowName, string jobContentType, Microsoft.Azure.CognitiveServices.ContentModerator.Models.Content content, string callBackEndpoint = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateJobWithHttpMessagesAsync : string * string * string * string * string * Microsoft.Azure.CognitiveServices.ContentModerator.Models.Content * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.JobId>>
override this.CreateJobWithHttpMessagesAsync : string * string * string * string * string * Microsoft.Azure.CognitiveServices.ContentModerator.Models.Content * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.JobId>>
Public Function CreateJobWithHttpMessagesAsync (teamName As String, contentType As String, contentId As String, workflowName As String, jobContentType As String, content As Content, Optional callBackEndpoint As String = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of JobId))

参数

teamName
String

你的团队名称。

contentType
String

图像、文本或视频。 可能的值包括:“Image”、“Text”、“Video”

contentId
String

用于标识所提交内容的 ID/名称。

workflowName
String

要调用的工作流名称。

jobContentType
String

内容类型。 可能的值包括:“application/json”、“image/jpeg”

content
Content

要评估的内容。

callBackEndpoint
String

用于发布创建作业结果的回调终结点。

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

实现

例外

操作返回无效状态代码时引发

无法反序列化响应时引发

当所需的参数为 null 时引发

当所需的参数为 null 时引发

适用于