Skip to content

Latest commit

 

History

History
199 lines (110 loc) · 5.22 KB

dialog.md

File metadata and controls

199 lines (110 loc) · 5.22 KB

model

import "github.com/dueros/bot-sdk-go/bot/model"

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 (this *Dialog) ConfirmIntent() *Dialog

对意图进行确认

func (*Dialog) ConfirmSlot

func (this *Dialog) ConfirmSlot(name string) *Dialog

对槽位进行confirm

func (*Dialog) Delegate

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 (this *Dialog) GetIntentConfirmationStatus(index ...int) string

获取意图的确认状态

func (this *Dialog) GetIntentName() (string, bool)

获取当前意图的名字

func (*Dialog) GetQuery

func (this *Dialog) GetQuery() (string, bool)

获取用户请求的原始query

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 (*IntentRequest) GetQuery

func (this *IntentRequest) GetQuery() string

获取用户请求query

func (*IntentRequest) IsDialogStateCompleted

func (this *IntentRequest) IsDialogStateCompleted() bool

槽位填充是否完成


Generated by godoc2md