当我从 alexa 调用我的服务时,我得到的不是我应该得到的 slot 的值。我有这样的意图模式:
{
"interactionModel": {
"languageModel": {
"invocationName": "name_of_app",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "EventsIntent",
"slots": [
{
"name": "City",
"type": "AMAZON.GB_CITY"
}
],
"samples": [
"whats {City}",
"whats going on in {City} ",
"tell me about {City}"
]
}
],
"types": []
}
}
}
我的 Flask-Ask 代码我想在哪里导入城市,但是当我运行我的代码时,我在城市名称的地方得到 None 。
@ask.intent('EventsIntent', mapping={'city': 'City'})
def weather(city):
return statement('you have selected {}'.format(city))