import "github.com/dueros/bot-sdk-go/bot/model"
- type Dialog
- func NewDialog(request data.IntentRequestBody) *Dialog
- func (this *Dialog) ConfirmIntent() *Dialog
- func (this *Dialog) ConfirmSlot(name string) *Dialog
- func (this *Dialog) Delegate() *Dialog
- func (this *Dialog) ElicitSlot(name string) *Dialog
- func (this *Dialog) GetDirective() *data.DialogDirective
- func (this *Dialog) GetIntentConfirmationStatus(index ...int) string
- func (this *Dialog) GetIntentName() (string, bool)
- func (this *Dialog) GetQuery() (string, bool)
- func (this *Dialog) GetSlotConfirmationStatus(name string, index ...int) string
- func (this *Dialog) GetSlotValue(name string, index ...int) string
- type IntentRequest
dialog.go intent.go request.go response.go session.go ssml_builder.go
type Dialog struct {
Intents []*Intent
DialogState string
// contains filtered or unexported fields
}
func NewDialog(request data.IntentRequestBody) *Dialog
func (*Dialog) ConfirmIntent
func (this *Dialog) ConfirmIntent() *Dialog
对意图进行确认
func (*Dialog) ConfirmSlot
func (this *Dialog) ConfirmSlot(name string) *Dialog
对槽位进行confirm
func (this *Dialog) Delegate() *Dialog
托管对话. 对话由DuerOS代为处理
func (*Dialog) ElicitSlot
func (this *Dialog) ElicitSlot(name string) *Dialog
询问槽位
func (*Dialog) GetDirective
func (this *Dialog) GetDirective() *data.DialogDirective
func (*Dialog) GetIntentConfirmationStatus
func (this *Dialog) GetIntentConfirmationStatus(index ...int) string
获取意图的确认状态
func (*Dialog) GetIntentName
func (this *Dialog) GetIntentName() (string, bool)
获取当前意图的名字
func (this *Dialog) GetQuery() (string, bool)
获取用户请求的原始query
func (*Dialog) GetSlotConfirmationStatus
func (this *Dialog) GetSlotConfirmationStatus(name string, index ...int) string
获取槽位的确认状态,默认取第一组槽位
func (*Dialog) GetSlotValue
func (this *Dialog) GetSlotValue(name string, index ...int) string
获取槽位的值,默认取第一组槽位
type IntentRequest struct {
Data data.IntentRequest
Dialog *Dialog
Request
}
func (*IntentRequest) GetIntentName
func (this *IntentRequest) GetIntentName() (string, bool)
获取意图名
func (this *IntentRequest) GetQuery() string
获取用户请求query
func (*IntentRequest) IsDialogStateCompleted
func (this *IntentRequest) IsDialogStateCompleted() bool
槽位填充是否完成
Generated by godoc2md