nlp_automl

package
v1.62.416 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EndpointMap map[string]string

EndpointMap Endpoint Data

View Source
var EndpointType = "regional"

EndpointType regional or central

Functions

func GetEndpointMap

func GetEndpointMap() map[string]string

GetEndpointMap Get Endpoint Data Map

func GetEndpointType

func GetEndpointType() string

GetEndpointType Get Endpoint Type Value

func SetClientProperty

func SetClientProperty(client *Client, propertyName string, propertyValue interface{})

SetClientProperty Set Property by Reflect

func SetEndpointDataToClient

func SetEndpointDataToClient(client *Client)

SetEndpointDataToClient Set EndpointMap and ENdpointType

Types

type Client

type Client struct {
	sdk.Client
}

Client is the sdk client struct, each func corresponds to an OpenAPI

func NewClient

func NewClient() (client *Client, err error)

NewClient creates a sdk client with environment variables Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/nlp-automl instead

func NewClientWithAccessKey

func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)

NewClientWithAccessKey is a shortcut to create sdk client with accesskey usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/nlp-automl instead

func NewClientWithEcsRamRole

func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)

NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/nlp-automl instead

func NewClientWithOptions

func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error)

NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential this is the common api to create a sdk client Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/nlp-automl instead

func NewClientWithProvider

func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error)

NewClientWithProvider creates a sdk client with providers usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/nlp-automl instead

func NewClientWithRamRoleArn

func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/nlp-automl instead

func NewClientWithRamRoleArnAndPolicy

func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error)

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/nlp-automl instead

func NewClientWithRsaKeyPair

func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)

NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/nlp-automl instead

func NewClientWithStsToken

func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)

NewClientWithStsToken is a shortcut to create sdk client with sts token usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/nlp-automl instead

func (*Client) CreateAsyncPredict added in v1.60.304

func (client *Client) CreateAsyncPredict(request *CreateAsyncPredictRequest) (response *CreateAsyncPredictResponse, err error)

CreateAsyncPredict invokes the nlp_automl.CreateAsyncPredict API synchronously api document: https://help.aliyun.com/api/nlp-automl/createasyncpredict.html

func (*Client) CreateAsyncPredictWithCallback added in v1.60.304

func (client *Client) CreateAsyncPredictWithCallback(request *CreateAsyncPredictRequest, callback func(response *CreateAsyncPredictResponse, err error)) <-chan int

CreateAsyncPredictWithCallback invokes the nlp_automl.CreateAsyncPredict API asynchronously api document: https://help.aliyun.com/api/nlp-automl/createasyncpredict.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) CreateAsyncPredictWithChan added in v1.60.304

func (client *Client) CreateAsyncPredictWithChan(request *CreateAsyncPredictRequest) (<-chan *CreateAsyncPredictResponse, <-chan error)

CreateAsyncPredictWithChan invokes the nlp_automl.CreateAsyncPredict API asynchronously api document: https://help.aliyun.com/api/nlp-automl/createasyncpredict.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GetAsyncPredict added in v1.60.304

func (client *Client) GetAsyncPredict(request *GetAsyncPredictRequest) (response *GetAsyncPredictResponse, err error)

GetAsyncPredict invokes the nlp_automl.GetAsyncPredict API synchronously api document: https://help.aliyun.com/api/nlp-automl/getasyncpredict.html

func (*Client) GetAsyncPredictWithCallback added in v1.60.304

func (client *Client) GetAsyncPredictWithCallback(request *GetAsyncPredictRequest, callback func(response *GetAsyncPredictResponse, err error)) <-chan int

GetAsyncPredictWithCallback invokes the nlp_automl.GetAsyncPredict API asynchronously api document: https://help.aliyun.com/api/nlp-automl/getasyncpredict.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GetAsyncPredictWithChan added in v1.60.304

func (client *Client) GetAsyncPredictWithChan(request *GetAsyncPredictRequest) (<-chan *GetAsyncPredictResponse, <-chan error)

GetAsyncPredictWithChan invokes the nlp_automl.GetAsyncPredict API asynchronously api document: https://help.aliyun.com/api/nlp-automl/getasyncpredict.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GetPredictResult

func (client *Client) GetPredictResult(request *GetPredictResultRequest) (response *GetPredictResultResponse, err error)

GetPredictResult invokes the nlp_automl.GetPredictResult API synchronously api document: https://help.aliyun.com/api/nlp-automl/getpredictresult.html

func (*Client) GetPredictResultWithCallback

func (client *Client) GetPredictResultWithCallback(request *GetPredictResultRequest, callback func(response *GetPredictResultResponse, err error)) <-chan int

GetPredictResultWithCallback invokes the nlp_automl.GetPredictResult API asynchronously api document: https://help.aliyun.com/api/nlp-automl/getpredictresult.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GetPredictResultWithChan

func (client *Client) GetPredictResultWithChan(request *GetPredictResultRequest) (<-chan *GetPredictResultResponse, <-chan error)

GetPredictResultWithChan invokes the nlp_automl.GetPredictResult API asynchronously api document: https://help.aliyun.com/api/nlp-automl/getpredictresult.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) RunContactReview

func (client *Client) RunContactReview(request *RunContactReviewRequest) (response *RunContactReviewResponse, err error)

RunContactReview invokes the nlp_automl.RunContactReview API synchronously api document: https://help.aliyun.com/api/nlp-automl/runcontactreview.html

func (*Client) RunContactReviewWithCallback

func (client *Client) RunContactReviewWithCallback(request *RunContactReviewRequest, callback func(response *RunContactReviewResponse, err error)) <-chan int

RunContactReviewWithCallback invokes the nlp_automl.RunContactReview API asynchronously api document: https://help.aliyun.com/api/nlp-automl/runcontactreview.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) RunContactReviewWithChan

func (client *Client) RunContactReviewWithChan(request *RunContactReviewRequest) (<-chan *RunContactReviewResponse, <-chan error)

RunContactReviewWithChan invokes the nlp_automl.RunContactReview API asynchronously api document: https://help.aliyun.com/api/nlp-automl/runcontactreview.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

type ContactContent

type ContactContent struct {
	ReviewResults    []ReviewResult    `json:"ReviewResults" xml:"ReviewResults"`
	StructureResults []StructureResult `json:"StructureResults" xml:"StructureResults"`
}

ContactContent is a nested struct in nlp_automl response

type CreateAsyncPredictRequest added in v1.60.304

type CreateAsyncPredictRequest struct {
	*requests.RpcRequest
	TopK         requests.Integer `position:"Body" name:"TopK"`
	FileType     string           `position:"Body" name:"FileType"`
	DetailTag    string           `position:"Body" name:"DetailTag"`
	Content      string           `position:"Body" name:"Content"`
	FileContent  string           `position:"Body" name:"FileContent"`
	ModelId      requests.Integer `position:"Body" name:"ModelId"`
	FileUrl      string           `position:"Body" name:"FileUrl"`
	ModelVersion string           `position:"Body" name:"ModelVersion"`
}

CreateAsyncPredictRequest is the request struct for api CreateAsyncPredict

func CreateCreateAsyncPredictRequest added in v1.60.304

func CreateCreateAsyncPredictRequest() (request *CreateAsyncPredictRequest)

CreateCreateAsyncPredictRequest creates a request to invoke CreateAsyncPredict API

type CreateAsyncPredictResponse added in v1.60.304

type CreateAsyncPredictResponse struct {
	*responses.BaseResponse
	RequestId      string `json:"RequestId" xml:"RequestId"`
	AsyncPredictId int64  `json:"AsyncPredictId" xml:"AsyncPredictId"`
}

CreateAsyncPredictResponse is the response struct for api CreateAsyncPredict

func CreateCreateAsyncPredictResponse added in v1.60.304

func CreateCreateAsyncPredictResponse() (response *CreateAsyncPredictResponse)

CreateCreateAsyncPredictResponse creates a response to parse from CreateAsyncPredict response

type EndPositionInRunContactReview

type EndPositionInRunContactReview struct {
	EndPosition []string `json:"EndPosition" xml:"EndPosition"`
}

EndPositionInRunContactReview is a nested struct in nlp_automl response

type GetAsyncPredictRequest added in v1.60.304

type GetAsyncPredictRequest struct {
	*requests.RpcRequest
	AsyncPredictId requests.Integer `position:"Query" name:"AsyncPredictId"`
}

GetAsyncPredictRequest is the request struct for api GetAsyncPredict

func CreateGetAsyncPredictRequest added in v1.60.304

func CreateGetAsyncPredictRequest() (request *GetAsyncPredictRequest)

CreateGetAsyncPredictRequest creates a request to invoke GetAsyncPredict API

type GetAsyncPredictResponse added in v1.60.304

type GetAsyncPredictResponse struct {
	*responses.BaseResponse
	RequestId      string `json:"RequestId" xml:"RequestId"`
	AsyncPredictId int    `json:"AsyncPredictId" xml:"AsyncPredictId"`
	Status         int    `json:"Status" xml:"Status"`
	Content        string `json:"Content" xml:"Content"`
}

GetAsyncPredictResponse is the response struct for api GetAsyncPredict

func CreateGetAsyncPredictResponse added in v1.60.304

func CreateGetAsyncPredictResponse() (response *GetAsyncPredictResponse)

CreateGetAsyncPredictResponse creates a response to parse from GetAsyncPredict response

type GetPredictResultRequest

type GetPredictResultRequest struct {
	*requests.RpcRequest
	TopK         requests.Integer `position:"Body" name:"TopK"`
	ModelId      requests.Integer `position:"Body" name:"ModelId"`
	DetailTag    string           `position:"Body" name:"DetailTag"`
	Content      string           `position:"Body" name:"Content"`
	ModelVersion string           `position:"Body" name:"ModelVersion"`
}

GetPredictResultRequest is the request struct for api GetPredictResult

func CreateGetPredictResultRequest

func CreateGetPredictResultRequest() (request *GetPredictResultRequest)

CreateGetPredictResultRequest creates a request to invoke GetPredictResult API

type GetPredictResultResponse

type GetPredictResultResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
	Content   string `json:"Content" xml:"Content"`
}

GetPredictResultResponse is the response struct for api GetPredictResult

func CreateGetPredictResultResponse

func CreateGetPredictResultResponse() (response *GetPredictResultResponse)

CreateGetPredictResultResponse creates a response to parse from GetPredictResult response

type ReviewResult

type ReviewResult struct {
	RiskLevel              string   `json:"RiskLevel" xml:"RiskLevel"`
	Reason                 string   `json:"Reason" xml:"Reason"`
	Type                   string   `json:"Type" xml:"Type"`
	ModificationSuggestion string   `json:"ModificationSuggestion" xml:"ModificationSuggestion"`
	Value                  []string `json:"Value" xml:"Value"`
	EndPosition            []string `json:"EndPosition" xml:"EndPosition"`
	StartPosition          []string `json:"StartPosition" xml:"StartPosition"`
}

ReviewResult is a nested struct in nlp_automl response

type ReviewResults

type ReviewResults struct {
	ReviewResult []ReviewResult `json:"ReviewResult" xml:"ReviewResult"`
}

ReviewResults is a nested struct in nlp_automl response

type RunContactReviewRequest

type RunContactReviewRequest struct {
	*requests.RpcRequest
	ContactScene string `position:"Body" name:"ContactScene"`
	ContactPath  string `position:"Body" name:"ContactPath"`
}

RunContactReviewRequest is the request struct for api RunContactReview

func CreateRunContactReviewRequest

func CreateRunContactReviewRequest() (request *RunContactReviewRequest)

CreateRunContactReviewRequest creates a request to invoke RunContactReview API

type RunContactReviewResponse

type RunContactReviewResponse struct {
	*responses.BaseResponse
	RequestId      string         `json:"RequestId" xml:"RequestId"`
	ContactContent ContactContent `json:"ContactContent" xml:"ContactContent"`
}

RunContactReviewResponse is the response struct for api RunContactReview

func CreateRunContactReviewResponse

func CreateRunContactReviewResponse() (response *RunContactReviewResponse)

CreateRunContactReviewResponse creates a response to parse from RunContactReview response

type StartPositionInRunContactReview

type StartPositionInRunContactReview struct {
	StartPosition []string `json:"StartPosition" xml:"StartPosition"`
}

StartPositionInRunContactReview is a nested struct in nlp_automl response

type StructureResult

type StructureResult struct {
	Name          string   `json:"Name" xml:"Name"`
	Type          string   `json:"Type" xml:"Type"`
	Value         []string `json:"Value" xml:"Value"`
	EndPosition   []string `json:"EndPosition" xml:"EndPosition"`
	StartPosition []string `json:"StartPosition" xml:"StartPosition"`
}

StructureResult is a nested struct in nlp_automl response

type StructureResults

type StructureResults struct {
	StructureResult []StructureResult `json:"StructureResult" xml:"StructureResult"`
}

StructureResults is a nested struct in nlp_automl response

type ValueInRunContactReview

type ValueInRunContactReview struct {
	Value []string `json:"Value" xml:"Value"`
}

ValueInRunContactReview is a nested struct in nlp_automl response

Jump to

Keyboard shortcuts

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