Documentation ¶
Index ¶
- type AudioCreateRequest
- type AudioCreateRequestCategories
- type AudioCreateRequestCategoriesEnum
- type AudioCreateRequestEventType
- type AudioCreateRequestEventTypeEnum
- type AudioInputBody
- type AudioModerationResultRequestParams
- type AudioModerationResultRequestParamsData
- type AudioModerationResultResult
- type AudioModerationResultResultDetails
- type AudioModerationResultResultDetailsSuggestion
- type AudioModerationResultResultDetailsSuggestionEnum
- type AudioModerationResultResultSegments
- type AudioModerationResultResultSuggestion
- type AudioModerationResultResultSuggestionEnum
- type RunCreateAudioModerationJobRequest
- type RunCreateAudioModerationJobResponse
- type RunQueryAudioModerationJobRequest
- type RunQueryAudioModerationJobResponse
- type RunQueryAudioModerationJobResponseStatus
- type RunQueryAudioModerationJobResponseStatusEnum
- type RunTextModerationRequest
- type RunTextModerationResponse
- type SegmentResult
- type TextDetectionDataReq
- type TextDetectionReq
- type TextDetectionResult
- type TextDetectionResultDetail
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
func (c AudioCreateRequestCategories) Value() string
type AudioCreateRequestCategoriesEnum ¶ added in v0.0.103
type AudioCreateRequestCategoriesEnum struct { POLITICS AudioCreateRequestCategories PORN AudioCreateRequestCategories AD AudioCreateRequestCategories MOAN AudioCreateRequestCategories ABUSE AudioCreateRequestCategories }
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
func (c AudioCreateRequestEventType) Value() string
type AudioCreateRequestEventTypeEnum ¶ added in v0.0.103
type AudioCreateRequestEventTypeEnum struct { DEFAULT AudioCreateRequestEventType AUDIOBOOK AudioCreateRequestEventType EDUCATION AudioCreateRequestEventType GAME AudioCreateRequestEventType LIVE AudioCreateRequestEventType ECOMMERCE AudioCreateRequestEventType VOICEROOM AudioCreateRequestEventType PRIVATE AudioCreateRequestEventType }
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
func (o AudioModerationResultRequestParams) String() string
type AudioModerationResultRequestParamsData ¶ added in v0.0.103
type AudioModerationResultRequestParamsData struct {
Url *string `json:"url,omitempty"`
}
func (AudioModerationResultRequestParamsData) String ¶ added in v0.0.103
func (o AudioModerationResultRequestParamsData) String() string
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
func (o AudioModerationResultResult) String() string
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
func (o AudioModerationResultResultDetails) String() string
type AudioModerationResultResultDetailsSuggestion ¶ added in v0.0.103
type AudioModerationResultResultDetailsSuggestion struct {
// contains filtered or unexported fields
}
func (AudioModerationResultResultDetailsSuggestion) MarshalJSON ¶ added in v0.0.103
func (c AudioModerationResultResultDetailsSuggestion) MarshalJSON() ([]byte, error)
func (*AudioModerationResultResultDetailsSuggestion) UnmarshalJSON ¶ added in v0.0.103
func (c *AudioModerationResultResultDetailsSuggestion) UnmarshalJSON(b []byte) error
func (AudioModerationResultResultDetailsSuggestion) Value ¶ added in v0.0.103
func (c AudioModerationResultResultDetailsSuggestion) Value() string
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
func (o AudioModerationResultResultSegments) String() string
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
func (c AudioModerationResultResultSuggestion) Value() string
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
func (o RunCreateAudioModerationJobRequest) String() string
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
func (o RunCreateAudioModerationJobResponse) String() string
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
func (o RunQueryAudioModerationJobRequest) String() string
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
func (o RunQueryAudioModerationJobResponse) String() string
type RunQueryAudioModerationJobResponseStatus ¶ added in v0.0.103
type RunQueryAudioModerationJobResponseStatus struct {
// contains filtered or unexported fields
}
func (RunQueryAudioModerationJobResponseStatus) MarshalJSON ¶ added in v0.0.103
func (c RunQueryAudioModerationJobResponseStatus) MarshalJSON() ([]byte, error)
func (*RunQueryAudioModerationJobResponseStatus) UnmarshalJSON ¶ added in v0.0.103
func (c *RunQueryAudioModerationJobResponseStatus) UnmarshalJSON(b []byte) error
func (RunQueryAudioModerationJobResponseStatus) Value ¶ added in v0.0.103
func (c RunQueryAudioModerationJobResponseStatus) Value() string
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
Source Files ¶
- model_audio_create_request.go
- model_audio_input_body.go
- model_audio_moderation_result_request_params.go
- model_audio_moderation_result_request_params_data.go
- model_audio_moderation_result_result.go
- model_audio_moderation_result_result_details.go
- model_audio_moderation_result_result_segments.go
- model_run_create_audio_moderation_job_request.go
- model_run_create_audio_moderation_job_response.go
- model_run_query_audio_moderation_job_request.go
- model_run_query_audio_moderation_job_response.go
- model_run_text_moderation_request.go
- model_run_text_moderation_response.go
- model_segment_result.go
- model_text_detection_data_req.go
- model_text_detection_req.go
- model_text_detection_result.go
- model_text_detection_result_detail.go
Click to show internal directories.
Click to hide internal directories.