v20190627

package
v3.0.233+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "2019-06-27"

Variables

This section is empty.

Functions

This section is empty.

Types

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) TextProcess

func (c *Client) TextProcess(request *TextProcessRequest) (response *TextProcessResponse, err error)

接收调用侧的文本输入,返回应答文本。

func (*Client) TextReset

func (c *Client) TextReset(request *TextResetRequest) (response *TextResetResponse, err error)

会话重置接口。

type Group

type Group struct {

	// 消息类型参考互联网MIME类型标准,当前仅支持"text/plain"。
	ContentType *string `json:"ContentType,omitempty" name:"ContentType"`

	// 返回内容以链接形式提供。
	// 注意:此字段可能返回 null,表示取不到有效值。
	Url *string `json:"Url,omitempty" name:"Url"`

	// 普通文本。
	// 注意:此字段可能返回 null,表示取不到有效值。
	Content *string `json:"Content,omitempty" name:"Content"`
}

type ResponseMessage

type ResponseMessage struct {

	// 消息组列表。
	// 注意:此字段可能返回 null,表示取不到有效值。
	GroupList []*Group `json:"GroupList,omitempty" name:"GroupList" list`
}

type SlotInfo

type SlotInfo struct {

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

	// 槽位值
	// 注意:此字段可能返回 null,表示取不到有效值。
	SlotValue *string `json:"SlotValue,omitempty" name:"SlotValue"`
}

type TextProcessRequest

type TextProcessRequest struct {
	*tchttp.BaseRequest

	// 机器人标识,用于定义抽象机器人。
	BotId *string `json:"BotId,omitempty" name:"BotId"`

	// 机器人版本,取值"dev"或"release",{调试版本:dev;线上版本:release}。
	BotEnv *string `json:"BotEnv,omitempty" name:"BotEnv"`

	// 终端标识,每个终端(或线程)对应一个,区分并发多用户。
	TerminalId *string `json:"TerminalId,omitempty" name:"TerminalId"`

	// 请求的文本。
	InputText *string `json:"InputText,omitempty" name:"InputText"`

	// 透传字段,透传给用户自定义的WebService服务。
	SessionAttributes *string `json:"SessionAttributes,omitempty" name:"SessionAttributes"`

	// 平台类型,{小程序:MiniProgram;小微:XiaoWei;公众号:OfficialAccount;企业微信: WXWork}。
	PlatformType *string `json:"PlatformType,omitempty" name:"PlatformType"`

	// 当PlatformType为微信公众号或企业微信时,传递对应微信公众号或企业微信的唯一标识
	PlatformId *string `json:"PlatformId,omitempty" name:"PlatformId"`
}

func NewTextProcessRequest

func NewTextProcessRequest() (request *TextProcessRequest)

func (*TextProcessRequest) FromJsonString

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

func (*TextProcessRequest) ToJsonString

func (r *TextProcessRequest) ToJsonString() string

type TextProcessResponse

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

		// 当前会话状态{会话开始: START; 会话中: COUTINUE; 会话结束: COMPLETE}。
		// 注意:此字段可能返回 null,表示取不到有效值。
		DialogStatus *string `json:"DialogStatus,omitempty" name:"DialogStatus"`

		// 匹配到的机器人名称。
		// 注意:此字段可能返回 null,表示取不到有效值。
		BotName *string `json:"BotName,omitempty" name:"BotName"`

		// 匹配到的意图名称。
		// 注意:此字段可能返回 null,表示取不到有效值。
		IntentName *string `json:"IntentName,omitempty" name:"IntentName"`

		// 槽位信息。
		// 注意:此字段可能返回 null,表示取不到有效值。
		SlotInfoList []*SlotInfo `json:"SlotInfoList,omitempty" name:"SlotInfoList" list`

		// 原始的用户说法。
		// 注意:此字段可能返回 null,表示取不到有效值。
		InputText *string `json:"InputText,omitempty" name:"InputText"`

		// 机器人应答。
		// 注意:此字段可能返回 null,表示取不到有效值。
		ResponseMessage *ResponseMessage `json:"ResponseMessage,omitempty" name:"ResponseMessage"`

		// 透传字段,由用户自定义的WebService服务返回。
		// 注意:此字段可能返回 null,表示取不到有效值。
		SessionAttributes *string `json:"SessionAttributes,omitempty" name:"SessionAttributes"`

		// 结果类型 {中间逻辑出错:0; 任务型机器人:1; 问答型机器人:2; 闲聊型机器人:3; 未匹配上,返回预设兜底话术:5; 未匹配上,返回相似问题列表:6}。
		// 注意:此字段可能返回 null,表示取不到有效值。
		ResultType *string `json:"ResultType,omitempty" name:"ResultType"`

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

func NewTextProcessResponse

func NewTextProcessResponse() (response *TextProcessResponse)

func (*TextProcessResponse) FromJsonString

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

func (*TextProcessResponse) ToJsonString

func (r *TextProcessResponse) ToJsonString() string

type TextResetRequest

type TextResetRequest struct {
	*tchttp.BaseRequest

	// 机器人标识,用于定义抽象机器人。
	BotId *string `json:"BotId,omitempty" name:"BotId"`

	// 机器人版本,取值"dev"或"release",{调试版本:dev;线上版本:release}。
	BotEnv *string `json:"BotEnv,omitempty" name:"BotEnv"`

	// 终端标识,每个终端(或线程)对应一个,区分并发多用户。
	TerminalId *string `json:"TerminalId,omitempty" name:"TerminalId"`

	// 平台类型,{小程序:MiniProgram;小微:XiaoWei;公众号:OfficialAccount;企业微信: WXWork}。
	PlatformType *string `json:"PlatformType,omitempty" name:"PlatformType"`

	// 当PlatformType为微信公众号或企业微信时,传递对应微信公众号或企业微信的唯一标识
	PlatformId *string `json:"PlatformId,omitempty" name:"PlatformId"`
}

func NewTextResetRequest

func NewTextResetRequest() (request *TextResetRequest)

func (*TextResetRequest) FromJsonString

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

func (*TextResetRequest) ToJsonString

func (r *TextResetRequest) ToJsonString() string

type TextResetResponse

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

		// 当前会话状态{会话开始: START; 会话中: COUTINUE; 会话结束: COMPLETE}。
		// 注意:此字段可能返回 null,表示取不到有效值。
		DialogStatus *string `json:"DialogStatus,omitempty" name:"DialogStatus"`

		// 匹配到的机器人名称。
		// 注意:此字段可能返回 null,表示取不到有效值。
		BotName *string `json:"BotName,omitempty" name:"BotName"`

		// 匹配到的意图名称。
		// 注意:此字段可能返回 null,表示取不到有效值。
		IntentName *string `json:"IntentName,omitempty" name:"IntentName"`

		// 槽位信息。
		// 注意:此字段可能返回 null,表示取不到有效值。
		SlotInfoList []*SlotInfo `json:"SlotInfoList,omitempty" name:"SlotInfoList" list`

		// 原始的用户说法。
		// 注意:此字段可能返回 null,表示取不到有效值。
		InputText *string `json:"InputText,omitempty" name:"InputText"`

		// 机器人应答。
		// 注意:此字段可能返回 null,表示取不到有效值。
		ResponseMessage *ResponseMessage `json:"ResponseMessage,omitempty" name:"ResponseMessage"`

		// 透传字段,由用户自定义的WebService服务返回。
		// 注意:此字段可能返回 null,表示取不到有效值。
		SessionAttributes *string `json:"SessionAttributes,omitempty" name:"SessionAttributes"`

		// 结果类型 {中间逻辑出错:0; 任务型机器人:1; 问答型机器人:2; 闲聊型机器人:3; 未匹配上,返回预设兜底话术:5; 未匹配上,返回相似问题列表:6}。
		// 注意:此字段可能返回 null,表示取不到有效值。
		ResultType *string `json:"ResultType,omitempty" name:"ResultType"`

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

func NewTextResetResponse

func NewTextResetResponse() (response *TextResetResponse)

func (*TextResetResponse) FromJsonString

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

func (*TextResetResponse) ToJsonString

func (r *TextResetResponse) ToJsonString() string

Jump to

Keyboard shortcuts

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