Methods summary
public
null
|
|
public
null
|
#
setSlot( string $field, string $value, string $index = 0 )
设置槽位
Parameters
- $field
- 槽位名
- $value
- 槽位值
- $index
- 第几组slot
Returns
null
Desc
设置slot。如果不存在,新增一个slot
|
public
string
|
#
getSlot( string $field, $index = 0 )
获取槽位
Parameters
Returns
string 槽位值
Desc
获取一个slot对应的值
|
public
string
|
|
public
boolean
|
#
hasAsked( )
是否询问过用户
Returns
boolean
Desc
是否有询问用户
|
public
null
|
#
ask( string|array $slot )
询问一个特定的槽位
Parameters
Returns
null
Desc
询问某些槽位。如果有询问一些槽位,表明多轮进行中
|
public
array
|
#
toDirective( )
Returns
array
Desc
打包NLU交互协议,返回DuerOS,为第二轮用户回答提供上下文
在Response 中被调用
|
public
array
|
#
toUpdateIntent( )
Returns
array
Desc
bot可以修改intent中slot对应的值,返回给DuerOS更新
在Response 中被调用
|
public
null
|
|
public
null
|
|
public
|
|