我目前正在尝试在Facebook Messenger中为我的亚马逊Lex聊天机器人添加快速回复按钮。这是我在python中的代码,但我在' responseCard':{
行中收到语法错误def helpMe(intent_request):
session_attributes = intent_request['sessionAttributes'] if intent_request['sessionAttributes'] is not None else {}
return close(
session_attributes,
'Fulfilled',
{
'contentType': 'PlainText',
'content': 'It seems like you need help, let me save you from your misery.\n\n'
+ '- If you want to find '
+ 'out what insurance plan is suitable for your dear self, try asking me "Which integrated Shield Plan is right for me?".\n\n '
+ '- If you want me to explain about your current plan, you could try asking me '
+ '"Explain my current plan".\n\n '
+ '- If you wanna listen to my extremely hilarious puns, just type in "joke" and you will not regret it hehe. '
},
'responseCard': {
'version': '0',
'contentType': 'application/vnd.amazonaws.card.generic',
'genericAttachments': [
{
'title': 'Help',
'subTitle': 'Select button of choice',
'imageUrl': '',
"buttons":[
{
"text":"recommend plan",
"value":"Which integrated Shield Plan is right for me"
},
{
"text":"current plan",
"value":"Explain my current plan"
},
{
"text":"tell me a joke",
"value":"joke"
}
]
}
]
}
)
我无法找到错误的解决方案,有人可以帮助我吗?