model

package
v0.0.106 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 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"`

	// 需要检测的风险类型,若未传或者传参为空,则表示全场景审核。
	Categories *[]AudioCreateRequestCategories `json:"categories,omitempty"`

	// 回调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 AudioModerationResultRequestParams added in v0.0.103

type AudioModerationResultRequestParams struct {
	EventType *string `json:"event_type,omitempty"`

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

	Callback *string `json:"callback,omitempty"`

	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"`
}

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 *[]AudioModerationResultResultDetails `json:"details,omitempty"`

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

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

func (AudioModerationResultResult) String added in v0.0.103

type AudioModerationResultResultDetails added in v0.0.103

type AudioModerationResultResultDetails struct {

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

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

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

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

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

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

func (AudioModerationResultResultDetails) String added in v0.0.103

type AudioModerationResultResultDetailsSuggestion added in v0.0.103

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

func (AudioModerationResultResultDetailsSuggestion) MarshalJSON added in v0.0.103

func (*AudioModerationResultResultDetailsSuggestion) UnmarshalJSON added in v0.0.103

func (AudioModerationResultResultDetailsSuggestion) Value added in v0.0.103

type AudioModerationResultResultDetailsSuggestionEnum added in v0.0.103

type AudioModerationResultResultDetailsSuggestionEnum struct {
	BLOCK  AudioModerationResultResultDetailsSuggestion
	REVIEW AudioModerationResultResultDetailsSuggestion
}

func GetAudioModerationResultResultDetailsSuggestionEnum added in v0.0.103

func GetAudioModerationResultResultDetailsSuggestionEnum() AudioModerationResultResultDetailsSuggestionEnum

type AudioModerationResultResultSegments added in v0.0.103

type AudioModerationResultResultSegments struct {

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

func (AudioModerationResultResultSegments) 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 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 RunQueryAudioModerationJobRequest added in v0.0.103

type RunQueryAudioModerationJobRequest struct {
	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 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个字符以内,文本长度超过2000个字符时,只检测前2000个字符。
	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"`

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

	Data *TextDetectionDataReq `json:"data"`
}

文本内容审核请求体

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: 广告法  meaningless: ⽆意义  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

Jump to

Keyboard shortcuts

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