取消选中所需复选框后,在lambda代码中执行以下操作:
# inside dialogcodehook
slots = intent_request['currentIntent']['slots']
nation = slots['nation']
if nation == 'C':
return close('I am sorry, C is not applicable to apply. Only A and B can apply.')
# rest of your code
def close(msg):
"dialogAction": {
"type": "Close",
"fulfillmentState": "Fulfilled",
"message": {
"contentType": "PlainText",
"content": msg
}
}
你可能想看看
this question
,
this question
,
this question
,
this documentation
等
使用它,查看文档了解其他内容,并对进一步的疑问进行评论。
希望有帮助。