Constructor
new Request(data)
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | request body |
- Source:
Methods
getAudioPlayerContext() → {Mixed}
获取设备音频播放的状态
- Source:
Returns:
- Type
- Mixed
getBotId() → {string}
获取bot id
- Source:
Returns:
- Type
- string
getData() → {Object}
获取Request 的数据
- Source:
Returns:
- Type
- Object
getEventData() → {Mixed}
返回event request数据
- Source:
Returns:
- Type
- Mixed
getNlu() → {Nlu}
获取nlu 对象
- Source:
Returns:
- Type
- Nlu
getQuery() → {string}
获取请求的query
- Source:
Returns:
- Type
- string
getSession() → {Session}
获取session 对象
- Source:
Returns:
- Type
- Session
getType() → {string}
获取请求类型
- Source:
Returns:
- Type
- string
getUserId() → {string}
获取用户的user id
- Source:
Returns:
- Type
- string
isDialogStateCompleted() → {boolean}
判断槽位是否填完。针对于填槽多轮。
- Source:
Returns:
- Type
- boolean
isLaunchRequest() → {boolean}
判断是否为调起bot的请求
- Source:
Returns:
- Type
- boolean
isSessionEndedRequest() → {boolean}
判断是否为结束对话的请求
- Source:
Returns:
- Type
- boolean