Alexa AMAZON.YesIntent / NoIntent вход в диалог или передача намерения для слотов ответа - PullRequest
0 голосов
/ 09 ноября 2019

Что должен предоставить JSON, чтобы двусмысленные YesIntent или NoIntent возвращались в поток диалогов или передавали его другим намерениям?

1 Ответ

0 голосов
/ 15 ноября 2019

Отслеживайте свое последнее намерение, передавая его в атрибутах сеанса.

def yesIntent(intent,session):
last_intent = session['attributes']['current_intent']

if last_intent == "intent1":
    speech_output="this is response to intent 1"
    *Rest of the code*
elif last_intent == "intent2" :
    speech_output = "This is reponse to intent 2"
    *Rest of the code*
...