35 lines
1.2 KiB
Go
35 lines
1.2 KiB
Go
package model
|
|
|
|
import (
|
|
green20220302 "github.com/alibabacloud-go/green-20220302/v2/client"
|
|
)
|
|
|
|
// TextScanRequest 文本审核请求结构
|
|
type TextScanRequest struct {
|
|
Tasks []TextTask `json:"tasks"`
|
|
Services []string `json:"services"` // 2.0版本使用services而不是scenes
|
|
}
|
|
|
|
// TextTask 文本任务结构
|
|
type TextTask struct {
|
|
DataID string `json:"dataId"`
|
|
Content string `json:"content"`
|
|
}
|
|
|
|
// TextScanResponse 文本审核响应结构
|
|
type TextScanResponse struct {
|
|
Code int32 `json:"code"`
|
|
Message string `json:"message"`
|
|
Data []TextScanData `json:"data"`
|
|
}
|
|
|
|
// TextScanData 文本审核数据
|
|
type TextScanData struct {
|
|
Code int32 `json:"code"`
|
|
Message string `json:"message"`
|
|
DataID string `json:"dataId"`
|
|
DetectedLanguage string `json:"detectedLanguage"`
|
|
TranslatedContent string `json:"translatedContent"`
|
|
Results []*green20220302.TextModerationPlusResponseBodyDataResult `json:"results"`
|
|
}
|