v20200727

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "2020-07-27"

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgorithmResult

type AlgorithmResult struct {

	// 算法ID
	AlgoId *string `json:"AlgoId,omitempty" name:"AlgoId"`

	// 算法名称
	// 注意:此字段可能返回 null,表示取不到有效值。
	AlgoName *string `json:"AlgoName,omitempty" name:"AlgoName"`

	// 算法返回的结果。
	// - 当算法类型为“OCR(1)”时,结果为文本字符串
	// - 当算法类型为“文本分类(2)”时,结果字符串为json对象数组:
	//   Class:分类结果
	//   Confidence:置信度
	// - 算法类型为“情感分析(3)”时,结果字符串为json对象:
	//   Positive:正面情感概率
	//   Negative:负面情感概率
	//   Neutral:中性情感概率
	// - 当算法类型为“合同要素抽取(4)”时,结果字符串为json对象数组:
	//   NodeName:一级要素名称
	//   ItemName:二级要素名称
	//   Content:要素文本内容
	// - 当算法类型为“实体识别(5)”时,结果字符串为json对象数组:
	//   - Entity:实体类型
	//   - Content:实体文本内容
	// 注意:此字段可能返回 null,表示取不到有效值。
	Result *string `json:"Result,omitempty" name:"Result"`

	// 算法调用错误信息
	// 注意:此字段可能返回 null,表示取不到有效值。
	Error *string `json:"Error,omitempty" name:"Error"`

	// 算法类型:
	// 1:OCR算法
	// 2:文本分类算法
	// 3:情感分析算法
	// 4:合同要素抽取算法
	// 5、实体识别算法
	// 注意:此字段可能返回 null,表示取不到有效值。
	AlgoType *int64 `json:"AlgoType,omitempty" name:"AlgoType"`
}

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) DescribeInvocationResult

func (c *Client) DescribeInvocationResult(request *DescribeInvocationResultRequest) (response *DescribeInvocationResultResponse, err error)

获取服务调用结果。和InvokeService接口配置合适,其InvokeId参数为InvokeService接口返回的RequestId。

func (*Client) InvokeService

func (c *Client) InvokeService(request *InvokeServiceRequest) (response *InvokeServiceResponse, err error)

通过传入文档url,测试服务算法。此接口需要和DescribeInvocationResult接口配置使用,该接口使用InvokeService返回的RequestId作为InvokeId参数,用于查询调用结果。

type DescribeInvocationResultRequest

type DescribeInvocationResultRequest struct {
	*tchttp.BaseRequest

	// 调用id,为调用InvokeService接口返回的RequestId
	InvokeId *string `json:"InvokeId,omitempty" name:"InvokeId"`
}

func NewDescribeInvocationResultRequest

func NewDescribeInvocationResultRequest() (request *DescribeInvocationResultRequest)

func (*DescribeInvocationResultRequest) FromJsonString

func (r *DescribeInvocationResultRequest) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeInvocationResultRequest) ToJsonString

func (r *DescribeInvocationResultRequest) ToJsonString() string

type DescribeInvocationResultResponse

type DescribeInvocationResultResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 服务的调用结果
		Results []*AlgorithmResult `json:"Results,omitempty" name:"Results" list`

		// 0:获取结果失败
		// 1:结果还没有生成,继续轮询
		// 2:获取结果成功
		Status *int64 `json:"Status,omitempty" name:"Status"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeInvocationResultResponse

func NewDescribeInvocationResultResponse() (response *DescribeInvocationResultResponse)

func (*DescribeInvocationResultResponse) FromJsonString

func (r *DescribeInvocationResultResponse) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeInvocationResultResponse) ToJsonString

func (r *DescribeInvocationResultResponse) ToJsonString() string

type InvokeServiceRequest

type InvokeServiceRequest struct {
	*tchttp.BaseRequest

	// 待调用的服务ID。
	ServiceId *string `json:"ServiceId,omitempty" name:"ServiceId"`

	// 要调用服务的状态:0表示调试版本,1表示上线版本
	ServiceStatus *int64 `json:"ServiceStatus,omitempty" name:"ServiceStatus"`

	// 用于测试的文档的URL。
	FileUrl *string `json:"FileUrl,omitempty" name:"FileUrl"`

	// 用于测试的文本,当此值不为空时,调用内容以此参数的值为准。
	Input *string `json:"Input,omitempty" name:"Input"`
}

func NewInvokeServiceRequest

func NewInvokeServiceRequest() (request *InvokeServiceRequest)

func (*InvokeServiceRequest) FromJsonString

func (r *InvokeServiceRequest) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*InvokeServiceRequest) ToJsonString

func (r *InvokeServiceRequest) ToJsonString() string

type InvokeServiceResponse

type InvokeServiceResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewInvokeServiceResponse

func NewInvokeServiceResponse() (response *InvokeServiceResponse)

func (*InvokeServiceResponse) FromJsonString

func (r *InvokeServiceResponse) FromJsonString(s string) error

It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*InvokeServiceResponse) ToJsonString

func (r *InvokeServiceResponse) ToJsonString() string

Jump to

Keyboard shortcuts

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