你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
IReviews.CreateJobWithHttpMessagesAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将为此终结点上发布的内容返回作业 ID。
根据工作流评估内容后,将基于工作流表达式创建或忽略评审。
<h3>CallBack 架构 </h3>
<p><h4>作业完成调用回拨示例</h4><br/>
{<br/> “JobId”: “<Job Id>,<br/> ”ReviewId“: ”<Review Id, 如果作业导致要创建的>评审“,<br/> ”WorkFlowId“: ”default“,<br/> ”Status“: ”<This will is of Complete, InProgress, Error>“,<br/> ”ContentType“: ”Image“,<br/> ”ContentId“: ”<This is the ContentId that specified on input>“,<br/> ”CallBackType“: ”Job“,<br/> ”Metadata“: {<br/> ”adultscore“: ”0.xxx“,<br/> ”a“: ”False“,<br/> ”racyscore“: ”0.xxx“,<br/> ”r“: ”True“<br/> }<br/ }<br/>>
</p><p><h4>Review Completion CallBack Sample</h4><br/>
{ “ReviewId”: ”<Review Id>“,<br/> ”ModifiedOn“: ”2016-10-11T22:36:32.9934851Z“,<br/> ”ModifiedBy“: ”“<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>>
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 时引发