model

package
v0.1.45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioCreateRequest added in v0.0.103

type AudioCreateRequest struct {
	Data *AudioInputBody `json:"data"`

	// 事件类型,可选值如下: default:默认事件 audiobook:有声书 education:教育音频 game:游戏语音房 live:秀场直播 ecommerce:电商直播 voiceroom:交友语音房 private:私密语音聊天
	EventType AudioCreateRequestEventType `json:"event_type"`

	// 需要检测的风险类型,列表不能为空。 风险类型如下: - porn:涉黄检测 - ad:广告检测 - moan:娇喘检测 - abuse:辱骂检测
	Categories []AudioCreateRequestCategories `json:"categories"`

	// 回调http接口:当该字段非空时,服务将根据该字段回调通知用户审核结果。
	Callback *string `json:"callback,omitempty"`
}

音频内容审核请求体

func (AudioCreateRequest) String added in v0.0.103

func (o AudioCreateRequest) String() string

type AudioCreateRequestCategories added in v0.0.103

type AudioCreateRequestCategories struct {
	// contains filtered or unexported fields
}

func (AudioCreateRequestCategories) MarshalJSON added in v0.0.103

func (c AudioCreateRequestCategories) MarshalJSON() ([]byte, error)

func (*AudioCreateRequestCategories) UnmarshalJSON added in v0.0.103

func (c *AudioCreateRequestCategories) UnmarshalJSON(b []byte) error

func (AudioCreateRequestCategories) Value added in v0.0.103

type AudioCreateRequestCategoriesEnum added in v0.0.103

func GetAudioCreateRequestCategoriesEnum added in v0.0.103

func GetAudioCreateRequestCategoriesEnum() AudioCreateRequestCategoriesEnum

type AudioCreateRequestEventType added in v0.0.103

type AudioCreateRequestEventType struct {
	// contains filtered or unexported fields
}

func (AudioCreateRequestEventType) MarshalJSON added in v0.0.103

func (c AudioCreateRequestEventType) MarshalJSON() ([]byte, error)

func (*AudioCreateRequestEventType) UnmarshalJSON added in v0.0.103

func (c *AudioCreateRequestEventType) UnmarshalJSON(b []byte) error

func (AudioCreateRequestEventType) Value added in v0.0.103

type AudioCreateRequestEventTypeEnum added in v0.0.103

func GetAudioCreateRequestEventTypeEnum added in v0.0.103

func GetAudioCreateRequestEventTypeEnum() AudioCreateRequestEventTypeEnum

type AudioInputBody added in v0.0.103

type AudioInputBody struct {

	// 音频url地址。
	Url string `json:"url"`
}

音频数据的输入

func (AudioInputBody) String added in v0.0.103

func (o AudioInputBody) String() string

type AudioModerationResultDetail added in v0.1.1

type AudioModerationResultDetail struct {

	// 音频片段开始时间
	StartTime *float32 `json:"start_time,omitempty"`

	// 音频片段审核处理建议: block:包含敏感信息,不通过 review:需要人工复检
	Suggestion *AudioModerationResultDetailSuggestion `json:"suggestion,omitempty"`

	// 音频片段结束时间
	EndTime *float32 `json:"end_time,omitempty"`

	// 音频片段标签
	Label *string `json:"label,omitempty"`

	// 音频片段文本内容
	AudioText *string `json:"audio_text,omitempty"`

	// 命中的风险片段信息列表,如果命中语义算法模型,则该字段不会存在
	Segments *[]VideoModerationDetailSegment `json:"segments,omitempty"`
}

func (AudioModerationResultDetail) String added in v0.1.1

type AudioModerationResultDetailSuggestion added in v0.1.1

type AudioModerationResultDetailSuggestion struct {
	// contains filtered or unexported fields
}

func (AudioModerationResultDetailSuggestion) MarshalJSON added in v0.1.1

func (c AudioModerationResultDetailSuggestion) MarshalJSON() ([]byte, error)

func (*AudioModerationResultDetailSuggestion) UnmarshalJSON added in v0.1.1

func (c *AudioModerationResultDetailSuggestion) UnmarshalJSON(b []byte) error

func (AudioModerationResultDetailSuggestion) Value added in v0.1.1

type AudioModerationResultDetailSuggestionEnum added in v0.1.1

type AudioModerationResultDetailSuggestionEnum struct {
	BLOCK  AudioModerationResultDetailSuggestion
	REVIEW AudioModerationResultDetailSuggestion
}

func GetAudioModerationResultDetailSuggestionEnum added in v0.1.1

func GetAudioModerationResultDetailSuggestionEnum() AudioModerationResultDetailSuggestionEnum

type AudioModerationResultRequestParams added in v0.0.103

type AudioModerationResultRequestParams struct {

	// 创建作业时传的event_type参数
	EventType *string `json:"event_type,omitempty"`

	Data *AudioModerationResultRequestParamsData `json:"data,omitempty"`

	// 创建作业时传的callback参数
	Callback *string `json:"callback,omitempty"`

	// 创建作业时传的categories参数
	Categories *[]string `json:"categories,omitempty"`
}

作业创建参数

func (AudioModerationResultRequestParams) String added in v0.0.103

type AudioModerationResultRequestParamsData added in v0.0.103

type AudioModerationResultRequestParamsData struct {
	Url *string `json:"url,omitempty"`
}

创建作业时传的data参数

func (AudioModerationResultRequestParamsData) String added in v0.0.103

type AudioModerationResultResult added in v0.0.103

type AudioModerationResultResult struct {

	// 音频审核结果是否通过。 block:包含敏感信息,不通过 pass:不包含敏感信息,通过 review:需要人工复检
	Suggestion *AudioModerationResultResultSuggestion `json:"suggestion,omitempty"`

	// 审核详情
	Details *[]AudioModerationResultDetail `json:"details,omitempty"`

	// 音频文本内容
	AudioText *string `json:"audio_text,omitempty"`
}

作业审核结果,当作业状态为succeeded时存在

func (AudioModerationResultResult) String added in v0.0.103

type AudioModerationResultResultSuggestion added in v0.0.103

type AudioModerationResultResultSuggestion struct {
	// contains filtered or unexported fields
}

func (AudioModerationResultResultSuggestion) MarshalJSON added in v0.0.103

func (c AudioModerationResultResultSuggestion) MarshalJSON() ([]byte, error)

func (*AudioModerationResultResultSuggestion) UnmarshalJSON added in v0.0.103

func (c *AudioModerationResultResultSuggestion) UnmarshalJSON(b []byte) error

func (AudioModerationResultResultSuggestion) Value added in v0.0.103

type AudioModerationResultResultSuggestionEnum added in v0.0.103

type AudioModerationResultResultSuggestionEnum struct {
	BLOCK  AudioModerationResultResultSuggestion
	PASS   AudioModerationResultResultSuggestion
	REVIEW AudioModerationResultResultSuggestion
}

func GetAudioModerationResultResultSuggestionEnum added in v0.0.103

func GetAudioModerationResultResultSuggestionEnum() AudioModerationResultResultSuggestionEnum

type CheckImageModerationRequest added in v0.1.3

type CheckImageModerationRequest struct {
	Body *ImageDetectionReq `json:"body,omitempty"`
}

Request Object

func (CheckImageModerationRequest) String added in v0.1.3

type CheckImageModerationResponse added in v0.1.3

type CheckImageModerationResponse struct {

	// 本次请求的唯⼀标识,⽤于问题排查,建议保存。
	RequestId *string `json:"request_id,omitempty"`

	Result         *ImageDetectionResult `json:"result,omitempty"`
	HttpStatusCode int                   `json:"-"`
}

Response Object

func (CheckImageModerationResponse) String added in v0.1.3

type FaceLocationDetail added in v0.1.3

type FaceLocationDetail struct {

	// 检测出人脸的左上角横坐标。
	TopLeftX *int32 `json:"top_left_x,omitempty"`

	// 检测出人脸的左上角纵坐标。
	TopLeftY *int32 `json:"top_left_y,omitempty"`

	// 检测出人脸的右下角横坐标。
	BottomRightX *int32 `json:"bottom_right_x,omitempty"`

	// 检测出人脸的右下角纵坐标。
	BottomRightY *int32 `json:"bottom_right_y,omitempty"`
}

func (FaceLocationDetail) String added in v0.1.3

func (o FaceLocationDetail) String() string

type ImageDetectionReq added in v0.1.3

type ImageDetectionReq struct {

	// 事件类型。 可选值如下: head_image:头像 album:相册 dynamic:动态 article:帖子 comment:评论 room_cover:房间封面 group_message:群聊图片 message:私聊图片 product:商品图片
	EventType string `json:"event_type"`

	// 检测场景。可添加的检测场景如下: - terrorism:暴恐元素的检测。 - porn:涉黄元素的检测。 - image_text:广告图文的检测。 - 可通过配置上述场景,来完对应场景元素的检测。 > 每个检测场景的检测次数会分类统计。
	Categories []string `json:"categories"`

	ImageTextConfig *ImgTextConfig `json:"image_text_config,omitempty"`

	// 图片url, 与image二选一,目前支持: - 公网HTTP/HTTPS URL
	Url *string `json:"url,omitempty"`

	// 与url二选一,图片文件Base64编码字符串,要求base64编码后大小不超过10M,支持JPG/PNG/JPEG/WEBP/GIF/TIFF/TIF/HEIF等格式。
	Image *string `json:"image,omitempty"`
}

图像内容审核请求体

func (ImageDetectionReq) String added in v0.1.3

func (o ImageDetectionReq) String() string

type ImageDetectionResult added in v0.1.3

type ImageDetectionResult struct {

	// 审核结果是否通过。  block:包含敏感信息,不通过  pass:不包含敏感信息,通过  review:需要人工复检
	Suggestion *string `json:"suggestion,omitempty"`

	// 检测结果的一级标签。 支持category列表如下: terrorism: 暴恐 porn: 色情 image_text: 图文审核
	Category *string `json:"category,omitempty"`

	// 检测详情
	Details *[]ImageDetectionResultDetail `json:"details,omitempty"`

	// 图文审核检测出的文本,只有在category参数配置image_text且检测出文本时展示该字段。
	OcrText *string `json:"ocr_text,omitempty"`
}

func (ImageDetectionResult) String added in v0.1.3

func (o ImageDetectionResult) String() string

type ImageDetectionResultDetail added in v0.1.3

type ImageDetectionResultDetail struct {

	// 审核结果是否通过。 block:包含敏感信息,不通过 review:需要人工复检
	Suggestion string `json:"suggestion"`

	// 检测结果的一级标签。 支持category列表如下: terrorism: 暴恐 porn: 色情 image_text: 图文审核
	Category string `json:"category"`

	// 置信度,可选值在0-1之间,值越大,可信度越高。
	Confidence float32 `json:"confidence"`

	FaceLocation *FaceLocationDetail `json:"face_location,omitempty"`

	QrLocation *QrLocationDetail `json:"qr_location,omitempty"`

	// 图片中二维码指向的链接,当请求参数categories中包含image_text时存在。
	QrContent *string `json:"qr_content,omitempty"`

	// image_text场景下命中的文本片段。
	Segments *[]OcrTextDetail `json:"segments,omitempty"`

	// 识别的详细标签。
	Label *string `json:"label,omitempty"`
}

返回结果的详细内容。

func (ImageDetectionResultDetail) String added in v0.1.3

type ImgTextConfig added in v0.1.3

type ImgTextConfig struct {

	// 检测时使用的自定义黑名单词库列表。
	BlackGlossaryNames *[]string `json:"black_glossary_names,omitempty"`

	// 检测时使用的自定义白名单词库列表。
	WhiteGlossaryNames *[]string `json:"white_glossary_names,omitempty"`
}

图文审核场景的黑白词库传入参数设置。

func (ImgTextConfig) String added in v0.1.3

func (o ImgTextConfig) String() string

type OcrTextDetail added in v0.1.3

type OcrTextDetail struct {

	// 命中的风险片段
	Segment *string `json:"segment,omitempty"`

	// 命中的自定义词库名称。 命中自定义词库时,才会返回当前字段。
	GlossaryName *string `json:"glossary_name,omitempty"`
}

func (OcrTextDetail) String added in v0.1.3

func (o OcrTextDetail) String() string

type QrLocationDetail added in v0.1.3

type QrLocationDetail struct {

	// 检测出的二维码左上角横坐标。
	TopLeftX *int32 `json:"top_left_x,omitempty"`

	// 检测出的二维码左上角纵坐标。
	TopLeftY *int32 `json:"top_left_y,omitempty"`

	// 检测出的二维码右下角横坐标。
	BottomRightX *int32 `json:"bottom_right_x,omitempty"`

	// 检测出的二维码右下角纵坐标。
	BottomRightY *int32 `json:"bottom_right_y,omitempty"`
}

func (QrLocationDetail) String added in v0.1.3

func (o QrLocationDetail) String() string

type RunCreateAudioModerationJobRequest added in v0.0.103

type RunCreateAudioModerationJobRequest struct {
	Body *AudioCreateRequest `json:"body,omitempty"`
}

Request Object

func (RunCreateAudioModerationJobRequest) String added in v0.0.103

type RunCreateAudioModerationJobResponse added in v0.0.103

type RunCreateAudioModerationJobResponse struct {

	// 本次请求的唯⼀标识,⽤于问题排查,建议保存。
	RequestId *string `json:"request_id,omitempty"`

	// 作业唯一标识。
	JobId          *string `json:"job_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunCreateAudioModerationJobResponse) String added in v0.0.103

type RunCreateVideoModerationJobRequest added in v0.1.1

type RunCreateVideoModerationJobRequest struct {
	Body *VideoCreateRequest `json:"body,omitempty"`
}

Request Object

func (RunCreateVideoModerationJobRequest) String added in v0.1.1

type RunCreateVideoModerationJobResponse added in v0.1.1

type RunCreateVideoModerationJobResponse struct {

	// 本次请求的唯⼀标识,⽤于问题排查,建议保存。
	RequestId *string `json:"request_id,omitempty"`

	// 作业唯一标识。
	JobId          *string `json:"job_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunCreateVideoModerationJobResponse) String added in v0.1.1

type RunQueryAudioModerationJobRequest added in v0.0.103

type RunQueryAudioModerationJobRequest struct {

	// 创建作业成功时,接口返回的job_id。
	JobId string `json:"job_id"`
}

Request Object

func (RunQueryAudioModerationJobRequest) String added in v0.0.103

type RunQueryAudioModerationJobResponse added in v0.0.103

type RunQueryAudioModerationJobResponse struct {

	// 作业id
	JobId *string `json:"job_id,omitempty"`

	// 作业状态,可取值有: running: 正在运行 succeeded: 运行成功 failed: 运行失败
	Status *RunQueryAudioModerationJobResponseStatus `json:"status,omitempty"`

	Result *AudioModerationResultResult `json:"result,omitempty"`

	RequestParams *AudioModerationResultRequestParams `json:"request_params,omitempty"`

	// 作业创建时间
	CreateTime *string `json:"create_time,omitempty"`

	// 作业更新时间
	UpdateTime *string `json:"update_time,omitempty"`

	// 本次请求的唯⼀标识,⽤于问题排查,建议保存。
	RequestId      *string `json:"request_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunQueryAudioModerationJobResponse) String added in v0.0.103

type RunQueryAudioModerationJobResponseStatus added in v0.0.103

type RunQueryAudioModerationJobResponseStatus struct {
	// contains filtered or unexported fields
}

func (RunQueryAudioModerationJobResponseStatus) MarshalJSON added in v0.0.103

func (*RunQueryAudioModerationJobResponseStatus) UnmarshalJSON added in v0.0.103

func (c *RunQueryAudioModerationJobResponseStatus) UnmarshalJSON(b []byte) error

func (RunQueryAudioModerationJobResponseStatus) Value added in v0.0.103

type RunQueryAudioModerationJobResponseStatusEnum added in v0.0.103

type RunQueryAudioModerationJobResponseStatusEnum struct {
	RUNNING   RunQueryAudioModerationJobResponseStatus
	SUCCEEDED RunQueryAudioModerationJobResponseStatus
	FAILED    RunQueryAudioModerationJobResponseStatus
}

func GetRunQueryAudioModerationJobResponseStatusEnum added in v0.0.103

func GetRunQueryAudioModerationJobResponseStatusEnum() RunQueryAudioModerationJobResponseStatusEnum

type RunQueryVideoModerationJobRequest added in v0.1.1

type RunQueryVideoModerationJobRequest struct {

	// 创建作业成功时,接口返回的job_id。
	JobId string `json:"job_id"`
}

Request Object

func (RunQueryVideoModerationJobRequest) String added in v0.1.1

type RunQueryVideoModerationJobResponse added in v0.1.1

type RunQueryVideoModerationJobResponse struct {

	// 本次请求的唯⼀标识,⽤于问题排查,建议保存。
	RequestId *string `json:"request_id,omitempty"`

	// 作业id
	JobId *string `json:"job_id,omitempty"`

	// 作业状态,可取值有:  running: 正在运行 succeeded: 运行成功  failed: 运行失败
	Status *RunQueryVideoModerationJobResponseStatus `json:"status,omitempty"`

	RequestParams *VideoModerationResultRequestParams `json:"request_params,omitempty"`

	// 作业创建时间
	CreateTime *string `json:"create_time,omitempty"`

	// 作业更新时间
	UpdateTime *string `json:"update_time,omitempty"`

	Result         *VideoModerationResultResult `json:"result,omitempty"`
	HttpStatusCode int                          `json:"-"`
}

Response Object

func (RunQueryVideoModerationJobResponse) String added in v0.1.1

type RunQueryVideoModerationJobResponseStatus added in v0.1.1

type RunQueryVideoModerationJobResponseStatus struct {
	// contains filtered or unexported fields
}

func (RunQueryVideoModerationJobResponseStatus) MarshalJSON added in v0.1.1

func (*RunQueryVideoModerationJobResponseStatus) UnmarshalJSON added in v0.1.1

func (c *RunQueryVideoModerationJobResponseStatus) UnmarshalJSON(b []byte) error

func (RunQueryVideoModerationJobResponseStatus) Value added in v0.1.1

type RunQueryVideoModerationJobResponseStatusEnum added in v0.1.1

type RunQueryVideoModerationJobResponseStatusEnum struct {
	RUNNING   RunQueryVideoModerationJobResponseStatus
	SUCCEEDED RunQueryVideoModerationJobResponseStatus
	FAILED    RunQueryVideoModerationJobResponseStatus
}

func GetRunQueryVideoModerationJobResponseStatusEnum added in v0.1.1

func GetRunQueryVideoModerationJobResponseStatusEnum() RunQueryVideoModerationJobResponseStatusEnum

type RunTextModerationRequest

type RunTextModerationRequest struct {
	Body *TextDetectionReq `json:"body,omitempty"`
}

Request Object

func (RunTextModerationRequest) String

func (o RunTextModerationRequest) String() string

type RunTextModerationResponse

type RunTextModerationResponse struct {

	// 本次请求的唯⼀标识,⽤于问题排查,建议保存
	RequestId *string `json:"request_id,omitempty"`

	Result         *TextDetectionResult `json:"result,omitempty"`
	HttpStatusCode int                  `json:"-"`
}

Response Object

func (RunTextModerationResponse) String

func (o RunTextModerationResponse) String() string

type SegmentResult

type SegmentResult struct {

	// 命中的风险片段。
	Segment *string `json:"segment,omitempty"`

	// 命中的自定义词库名称。  命中自定义词库时,才会返回当前字段。
	GlossaryName *string `json:"glossary_name,omitempty"`
}

func (SegmentResult) String

func (o SegmentResult) String() string

type TextDetectionDataReq

type TextDetectionDataReq struct {

	// 待检测文本,编码格式为“utf-8”,限定2000个字符以内,文本长度超过1500个字符时,只检测前1500个字符。
	Text string `json:"text"`
}

func (TextDetectionDataReq) String

func (o TextDetectionDataReq) String() string

type TextDetectionReq

type TextDetectionReq struct {

	// 事件类型。  可选值如下:  nickname: 昵称  title: 标题  article: 帖⼦  comment: 评论  barrage: 弹幕  search: 搜索栏  profile: 个⼈简介
	EventType string `json:"event_type"`

	// 检测时使用的自定义黑名单词库列表。自定义黑词库的创建和使用请参见[配置定义黑名单词库](https://support.huaweicloud.com/api-moderation/moderation_03_0027.html#moderation_03_0027__section12400140132318)。
	GlossaryNames *[]string `json:"glossary_names,omitempty"`

	Data *TextDetectionDataReq `json:"data"`

	// 检测时使用的自定义白名单词库列表。自定义白词库的创建和使用请参见[配置定义白名单词库](https://support.huaweicloud.com/api-moderation/moderation_03_0027.html#moderation_03_0027__section178844141394)。
	WhiteGlossaryNames *[]string `json:"white_glossary_names,omitempty"`
}

文本内容审核请求体

func (TextDetectionReq) String

func (o TextDetectionReq) String() string

type TextDetectionResult

type TextDetectionResult struct {

	// 审核结果是否通过。  block:包含敏感信息,不通过  pass:不包含敏感信息,通过  review:需要人工复检
	Suggestion *string `json:"suggestion,omitempty"`

	// 检测结果的标签。  支持label列表如下:  politics: 涉政  terrorism: 暴恐  porn: 色情  ban: 违禁  abuse: 辱骂  ad: 广告  ad_law: 广告法  meaningless: ⽆意义  customized:自定义(命中自定义词库中的关键词)
	Label *string `json:"label,omitempty"`

	// 检测详情
	Details *[]TextDetectionResultDetail `json:"details,omitempty"`
}

func (TextDetectionResult) String

func (o TextDetectionResult) String() string

type TextDetectionResultDetail

type TextDetectionResultDetail struct {

	// 审核结果是否通过。  block:包含敏感信息,不通过  pass:不包含敏感信息,通过  review:需要人工复检
	Suggestion *string `json:"suggestion,omitempty"`

	// 检测结果的标签。  支持label列表如下:  politics: 涉政  terrorism: 暴恐  porn: 色情  ban: 违禁  abuse: 辱骂  ad: 广告  ad_law: 广告法  customized:自定义(命中自定义词库中的关键词)
	Label *string `json:"label,omitempty"`

	// 置信度,取值范围 0-1,值越⼤,可信度越⾼。
	Confidence *float32 `json:"confidence,omitempty"`

	// 命中的风险片段信息,如果命中了语义算法模型,则会返回一个空的列表。
	Segments *[]SegmentResult `json:"segments,omitempty"`
}

func (TextDetectionResultDetail) String

func (o TextDetectionResultDetail) String() string

type VideoCreateRequest added in v0.1.1

type VideoCreateRequest struct {
	Data *VideoCreateRequestData `json:"data"`

	// 事件类型,可选值如下: default:默认事件
	EventType VideoCreateRequestEventType `json:"event_type"`

	// 视频中画面需要检测的风险类型,列表不能为空。 terrorism:涉政暴恐内容的检测 porn:鉴黄内容的检测 politics:政治敏感人物内容的检测 image_text:图文违规内容的检测(检测图片中出现的广告、色情、暴恐、涉政的文字违规内容以及二维码内容)
	ImageCategories []VideoCreateRequestImageCategories `json:"image_categories"`

	// 视频中音频需要检测的风险类型,不传或为空时表示不审核音频维度。 politics: 涉政检测 porn:涉黄检测 ad: 广告检测 moan: 娇喘检测 abuse: 辱骂检测
	AudioCategories *[]VideoCreateRequestAudioCategories `json:"audio_categories,omitempty"`

	// 回调http接口:当该字段非空时,服务将根据该字段回调通知用户审核结果。
	Callback *string `json:"callback,omitempty"`
}

func (VideoCreateRequest) String added in v0.1.1

func (o VideoCreateRequest) String() string

type VideoCreateRequestAudioCategories added in v0.1.1

type VideoCreateRequestAudioCategories struct {
	// contains filtered or unexported fields
}

func (VideoCreateRequestAudioCategories) MarshalJSON added in v0.1.1

func (c VideoCreateRequestAudioCategories) MarshalJSON() ([]byte, error)

func (*VideoCreateRequestAudioCategories) UnmarshalJSON added in v0.1.1

func (c *VideoCreateRequestAudioCategories) UnmarshalJSON(b []byte) error

func (VideoCreateRequestAudioCategories) Value added in v0.1.1

type VideoCreateRequestData added in v0.1.1

type VideoCreateRequestData struct {

	// 视频url地址
	Url string `json:"url"`

	// 截帧频率间隔,单位为秒,取值范围为1~60s;若不传递默认5s截帧一次
	FrameInterval *int32 `json:"frame_interval,omitempty"`
}

视频数据输入

func (VideoCreateRequestData) String added in v0.1.1

func (o VideoCreateRequestData) String() string

type VideoCreateRequestEventType added in v0.1.1

type VideoCreateRequestEventType struct {
	// contains filtered or unexported fields
}

func (VideoCreateRequestEventType) MarshalJSON added in v0.1.1

func (c VideoCreateRequestEventType) MarshalJSON() ([]byte, error)

func (*VideoCreateRequestEventType) UnmarshalJSON added in v0.1.1

func (c *VideoCreateRequestEventType) UnmarshalJSON(b []byte) error

func (VideoCreateRequestEventType) Value added in v0.1.1

type VideoCreateRequestEventTypeEnum added in v0.1.1

type VideoCreateRequestEventTypeEnum struct {
	DEFAULT VideoCreateRequestEventType
}

func GetVideoCreateRequestEventTypeEnum added in v0.1.1

func GetVideoCreateRequestEventTypeEnum() VideoCreateRequestEventTypeEnum

type VideoCreateRequestImageCategories added in v0.1.1

type VideoCreateRequestImageCategories struct {
	// contains filtered or unexported fields
}

func (VideoCreateRequestImageCategories) MarshalJSON added in v0.1.1

func (c VideoCreateRequestImageCategories) MarshalJSON() ([]byte, error)

func (*VideoCreateRequestImageCategories) UnmarshalJSON added in v0.1.1

func (c *VideoCreateRequestImageCategories) UnmarshalJSON(b []byte) error

func (VideoCreateRequestImageCategories) Value added in v0.1.1

type VideoCreateRequestImageCategoriesEnum added in v0.1.1

type VideoCreateRequestImageCategoriesEnum struct {
	PORN       VideoCreateRequestImageCategories
	POLITICS   VideoCreateRequestImageCategories
	TERRORISM  VideoCreateRequestImageCategories
	IMAGE_TEXT VideoCreateRequestImageCategories
}

func GetVideoCreateRequestImageCategoriesEnum added in v0.1.1

func GetVideoCreateRequestImageCategoriesEnum() VideoCreateRequestImageCategoriesEnum

type VideoModerationAudioDetailList added in v0.1.1

type VideoModerationAudioDetailList struct {

	// 风险置信度
	Confidence *float32 `json:"confidence,omitempty"`

	// 风险标签
	Label *string `json:"label,omitempty"`

	// 审核处理建议: block:包含敏感信息,不通过 review:需要人工复检
	Suggestion *VideoModerationAudioDetailListSuggestion `json:"suggestion,omitempty"`

	// 命中的风险片段信息列表,如果命中语义算法模型,则该字段不会存在
	Segments *[]VideoModerationDetailSegment `json:"segments,omitempty"`
}

func (VideoModerationAudioDetailList) String added in v0.1.1

type VideoModerationAudioDetailListSuggestion added in v0.1.1

type VideoModerationAudioDetailListSuggestion struct {
	// contains filtered or unexported fields
}

func (VideoModerationAudioDetailListSuggestion) MarshalJSON added in v0.1.1

func (*VideoModerationAudioDetailListSuggestion) UnmarshalJSON added in v0.1.1

func (c *VideoModerationAudioDetailListSuggestion) UnmarshalJSON(b []byte) error

func (VideoModerationAudioDetailListSuggestion) Value added in v0.1.1

type VideoModerationAudioDetailListSuggestionEnum added in v0.1.1

type VideoModerationAudioDetailListSuggestionEnum struct {
	BLOCK  VideoModerationAudioDetailListSuggestion
	REVIEW VideoModerationAudioDetailListSuggestion
}

func GetVideoModerationAudioDetailListSuggestionEnum added in v0.1.1

func GetVideoModerationAudioDetailListSuggestionEnum() VideoModerationAudioDetailListSuggestionEnum

type VideoModerationDetailSegment added in v0.1.1

type VideoModerationDetailSegment struct {

	// 命中的风险片段
	Segment *string `json:"segment,omitempty"`
}

func (VideoModerationDetailSegment) String added in v0.1.1

type VideoModerationImageDetail added in v0.1.1

type VideoModerationImageDetail struct {

	// 图像审核结果是否通过。 block:包含敏感信息,不通过  review:需要人工复检
	Suggestion *VideoModerationImageDetailSuggestion `json:"suggestion,omitempty"`

	// 检测结果的一级标签。 支持category列表如下: politics: 涉政  terrorism: 暴恐  porn: 色情  image_text: 图文审核
	Category *VideoModerationImageDetailCategory `json:"category,omitempty"`

	// 图文审核检测出的文本,只有在category参数配置image_text且检测出文本时展示该字段。
	OcrText *string `json:"ocr_text,omitempty"`

	// 截帧在视频文件中的时间,单位为秒
	Time *float32 `json:"time,omitempty"`

	// 图像帧审核详情
	Detail *[]VideoModerationImageDetailList `json:"detail,omitempty"`
}

func (VideoModerationImageDetail) String added in v0.1.1

type VideoModerationImageDetailCategory added in v0.1.1

type VideoModerationImageDetailCategory struct {
	// contains filtered or unexported fields
}

func (VideoModerationImageDetailCategory) MarshalJSON added in v0.1.1

func (c VideoModerationImageDetailCategory) MarshalJSON() ([]byte, error)

func (*VideoModerationImageDetailCategory) UnmarshalJSON added in v0.1.1

func (c *VideoModerationImageDetailCategory) UnmarshalJSON(b []byte) error

func (VideoModerationImageDetailCategory) Value added in v0.1.1

type VideoModerationImageDetailCategoryEnum added in v0.1.1

type VideoModerationImageDetailCategoryEnum struct {
	POLITICS   VideoModerationImageDetailCategory
	TERRORISM  VideoModerationImageDetailCategory
	PORN       VideoModerationImageDetailCategory
	IMAGE_TEXT VideoModerationImageDetailCategory
}

func GetVideoModerationImageDetailCategoryEnum added in v0.1.1

func GetVideoModerationImageDetailCategoryEnum() VideoModerationImageDetailCategoryEnum

type VideoModerationImageDetailList added in v0.1.1

type VideoModerationImageDetailList struct {

	// 置信度,可选值在0-1之间,值越大,可信度越高。
	Confidence *float32 `json:"confidence,omitempty"`

	// 检测结果的一级标签。 支持category列表如下: politics: 涉政  terrorism: 暴恐  porn: 色情  image_text: 图文审核
	Category *VideoModerationImageDetailListCategory `json:"category,omitempty"`

	// 审核结果是否通过。  block:包含敏感信息,不通过  review:需要人工复检
	Suggestion *VideoModerationImageDetailListSuggestion `json:"suggestion,omitempty"`

	// 识别的详细标签。
	Label *string `json:"label,omitempty"`

	FaceLocation *VideoModerationImageDetailListFaceLocation `json:"face_location,omitempty"`

	QrLocation *VideoModerationImageDetailListQrLocation `json:"qr_location,omitempty"`

	// 图片中二维码指向的链接,当请求参数categories中包含image_text时存在。
	QrContent *string `json:"qr_content,omitempty"`

	// image_text场景下命中的文本片段。
	Segments *[]VideoModerationDetailSegment `json:"segments,omitempty"`
}

func (VideoModerationImageDetailList) String added in v0.1.1

type VideoModerationImageDetailListCategory added in v0.1.1

type VideoModerationImageDetailListCategory struct {
	// contains filtered or unexported fields
}

func (VideoModerationImageDetailListCategory) MarshalJSON added in v0.1.1

func (c VideoModerationImageDetailListCategory) MarshalJSON() ([]byte, error)

func (*VideoModerationImageDetailListCategory) UnmarshalJSON added in v0.1.1

func (c *VideoModerationImageDetailListCategory) UnmarshalJSON(b []byte) error

func (VideoModerationImageDetailListCategory) Value added in v0.1.1

type VideoModerationImageDetailListCategoryEnum added in v0.1.1

func GetVideoModerationImageDetailListCategoryEnum added in v0.1.1

func GetVideoModerationImageDetailListCategoryEnum() VideoModerationImageDetailListCategoryEnum

type VideoModerationImageDetailListFaceLocation added in v0.1.1

type VideoModerationImageDetailListFaceLocation struct {

	// 检测出人脸的左上角横坐标。
	TopLeftX *int32 `json:"top_left_x,omitempty"`

	// 检测出人脸的左上角纵坐标。
	TopLeftY *int32 `json:"top_left_y,omitempty"`

	// 检测出人脸的右下角横坐标。
	BottomRightX *int32 `json:"bottom_right_x,omitempty"`

	// 检测出人脸的右下角纵坐标。
	BottomRightY *int32 `json:"bottom_right_y,omitempty"`
}

人物位置信息,该数组有四个值,分别代表左上角的坐标和右下角的坐标。例如[207,522,340,567] 207代表的是左上角的坐标 522代表左上角的坐标 340代表的是右下角的坐标 567代表的是右下角的坐标。

func (VideoModerationImageDetailListFaceLocation) String added in v0.1.1

type VideoModerationImageDetailListQrLocation added in v0.1.1

type VideoModerationImageDetailListQrLocation struct {

	// 检测出的二维码左上角横坐标。
	TopLeftX *int32 `json:"top_left_x,omitempty"`

	// 检测出的二维码左上角纵坐标。
	TopLeftY *int32 `json:"top_left_y,omitempty"`

	// 检测出的二维码右下角横坐标。
	BottomRightX *int32 `json:"bottom_right_x,omitempty"`

	// 检测出的二维码右下角纵坐标。
	BottomRightY *int32 `json:"bottom_right_y,omitempty"`
}

二维码位置信息,该数组有四个值,分别代表左上角的坐标和右下角的坐标。例如[207,522,340,567] 207代表的是左上角的坐标 522代表左上角的坐标 340代表的是右下角的坐标 567代表的是右下角的坐标。

func (VideoModerationImageDetailListQrLocation) String added in v0.1.1

type VideoModerationImageDetailListSuggestion added in v0.1.1

type VideoModerationImageDetailListSuggestion struct {
	// contains filtered or unexported fields
}

func (VideoModerationImageDetailListSuggestion) MarshalJSON added in v0.1.1

func (*VideoModerationImageDetailListSuggestion) UnmarshalJSON added in v0.1.1

func (c *VideoModerationImageDetailListSuggestion) UnmarshalJSON(b []byte) error

func (VideoModerationImageDetailListSuggestion) Value added in v0.1.1

type VideoModerationImageDetailListSuggestionEnum added in v0.1.1

type VideoModerationImageDetailListSuggestionEnum struct {
	BLOCK  VideoModerationImageDetailListSuggestion
	REVIEW VideoModerationImageDetailListSuggestion
}

func GetVideoModerationImageDetailListSuggestionEnum added in v0.1.1

func GetVideoModerationImageDetailListSuggestionEnum() VideoModerationImageDetailListSuggestionEnum

type VideoModerationImageDetailSuggestion added in v0.1.1

type VideoModerationImageDetailSuggestion struct {
	// contains filtered or unexported fields
}

func (VideoModerationImageDetailSuggestion) MarshalJSON added in v0.1.1

func (c VideoModerationImageDetailSuggestion) MarshalJSON() ([]byte, error)

func (*VideoModerationImageDetailSuggestion) UnmarshalJSON added in v0.1.1

func (c *VideoModerationImageDetailSuggestion) UnmarshalJSON(b []byte) error

func (VideoModerationImageDetailSuggestion) Value added in v0.1.1

type VideoModerationImageDetailSuggestionEnum added in v0.1.1

type VideoModerationImageDetailSuggestionEnum struct {
	BLOCK  VideoModerationImageDetailSuggestion
	REVIEW VideoModerationImageDetailSuggestion
}

func GetVideoModerationImageDetailSuggestionEnum added in v0.1.1

func GetVideoModerationImageDetailSuggestionEnum() VideoModerationImageDetailSuggestionEnum

type VideoModerationResultRequestParams added in v0.1.1

type VideoModerationResultRequestParams struct {
	Data *VideoModerationResultRequestParamsData `json:"data"`

	// 创建作业时传的event_type参数
	EventType string `json:"event_type"`

	// 创建作业时传的image_categories参数
	ImageCategories []string `json:"image_categories"`

	// 创建作业时传的audio_categories参数
	AudioCategories *[]string `json:"audio_categories,omitempty"`

	// 创建作业时传的callback参数
	Callback *string `json:"callback,omitempty"`
}

作业创建参数

func (VideoModerationResultRequestParams) String added in v0.1.1

type VideoModerationResultRequestParamsData added in v0.1.1

type VideoModerationResultRequestParamsData struct {

	// 创建作业时传的url参数
	Url string `json:"url"`

	// 创建作业时传的frame_interval参数,默认为5秒截取一帧
	FrameInterval *int32 `json:"frame_interval,omitempty"`
}

创建作业时传的data参数

func (VideoModerationResultRequestParamsData) String added in v0.1.1

type VideoModerationResultResult added in v0.1.1

type VideoModerationResultResult struct {

	// 视频审核结果是否通过。 block:包含敏感信息,不通过  review:需要人工复检 pass:不包含敏感信息,通过
	Suggestion *VideoModerationResultResultSuggestion `json:"suggestion,omitempty"`

	// 图像审核详情
	ImageDetail *[]VideoModerationImageDetail `json:"image_detail,omitempty"`

	// 音频审核详情
	AudioDetail *[]VideoModerationVideoDetail `json:"audio_detail,omitempty"`
}

作业审核结果,当作业状态为succeeded时存在

func (VideoModerationResultResult) String added in v0.1.1

type VideoModerationResultResultSuggestion added in v0.1.1

type VideoModerationResultResultSuggestion struct {
	// contains filtered or unexported fields
}

func (VideoModerationResultResultSuggestion) MarshalJSON added in v0.1.1

func (c VideoModerationResultResultSuggestion) MarshalJSON() ([]byte, error)

func (*VideoModerationResultResultSuggestion) UnmarshalJSON added in v0.1.1

func (c *VideoModerationResultResultSuggestion) UnmarshalJSON(b []byte) error

func (VideoModerationResultResultSuggestion) Value added in v0.1.1

type VideoModerationResultResultSuggestionEnum added in v0.1.1

type VideoModerationResultResultSuggestionEnum struct {
	BLOCK  VideoModerationResultResultSuggestion
	PASS   VideoModerationResultResultSuggestion
	REVIEW VideoModerationResultResultSuggestion
}

func GetVideoModerationResultResultSuggestionEnum added in v0.1.1

func GetVideoModerationResultResultSuggestionEnum() VideoModerationResultResultSuggestionEnum

type VideoModerationVideoDetail added in v0.1.1

type VideoModerationVideoDetail struct {

	// 音频片段审核结果是否通过。 block:包含敏感信息,不通过  review:需要人工复检
	Suggestion *VideoModerationVideoDetailSuggestion `json:"suggestion,omitempty"`

	// 音频片段检测标签,选取detail中置信度最大的标签,可取值如下: politics: 涉政  terrorism: 暴恐  porn: 色情  ad: 广告 ad_law: 广告法 abuse: 辱骂 ban: 违禁 meaningless: 无意义 moan: 娇喘
	Label *string `json:"label,omitempty"`

	// 音频片段文本内容
	AudioText *string `json:"audio_text,omitempty"`

	// 音频片段结束时间
	EndTime *float32 `json:"end_time,omitempty"`

	// 音频片段开始时间
	StartTime *float32 `json:"start_time,omitempty"`

	// 音频片段审核详情
	Detail *[]VideoModerationAudioDetailList `json:"detail,omitempty"`
}

func (VideoModerationVideoDetail) String added in v0.1.1

type VideoModerationVideoDetailSuggestion added in v0.1.1

type VideoModerationVideoDetailSuggestion struct {
	// contains filtered or unexported fields
}

func (VideoModerationVideoDetailSuggestion) MarshalJSON added in v0.1.1

func (c VideoModerationVideoDetailSuggestion) MarshalJSON() ([]byte, error)

func (*VideoModerationVideoDetailSuggestion) UnmarshalJSON added in v0.1.1

func (c *VideoModerationVideoDetailSuggestion) UnmarshalJSON(b []byte) error

func (VideoModerationVideoDetailSuggestion) Value added in v0.1.1

type VideoModerationVideoDetailSuggestionEnum added in v0.1.1

type VideoModerationVideoDetailSuggestionEnum struct {
	BLOCK  VideoModerationVideoDetailSuggestion
	REVIEW VideoModerationVideoDetailSuggestion
}

func GetVideoModerationVideoDetailSuggestionEnum added in v0.1.1

func GetVideoModerationVideoDetailSuggestionEnum() VideoModerationVideoDetailSuggestionEnum

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL