作者:王文波玉龙_946 | 来源:互联网 | 2023-09-14 17:32
就像Actions on Google中的Recommendation(快速按钮)一样,Amazon Lex中是否还有要使用的任何类/函数?
Google上的操作:agent.add(new Suggestion(' Your text here ')); // to provide quick suggestion to the user.
就像Google Amazon lex一样,它也有一个快速的建议,即响应卡。下面是一个示例图像和JSON对象,您将从带有响应卡的lex中获得这些图像。
从aws-lex采样JSON对象,它将生成响应卡。即快速建议
插槽。
{
"sampleUtterances": [
],"slotType": "","slotTypeVersion": "4","slotConstraint": "Optional","valueElicitationPrompt": {
"messages": [
{
"contentType": "PlainText","content": "what do you want to schedule"
}
],"responseCard": "{\"version\":1,\"contentType\":\"application/vnd.amazonaws.card.generic\",\"genericAttachments\":[{\"buttons\":[{\"text\":\"sales\",\"value\":\"sales consultation\"}]}]}","maxAttempts": 2
},"priority": 11,"name": "appointment"
}