How can Alexa make just one word?

I'm trying to write my first skill, Alexa, but the application flow is a bit confusing, even reading all the documentation on delegating dialogue, etc. I would really like the advice.

The thread that I execute

"Alexa, start the Movietime test."

Welcome to Quiz. Before we begin, which team are you in: red or blue?

"Blue".

Blue has always been the best team. Question 1: which of these films was not directed by Alfred Hitchcock? A: Dizziness, B: Rope, C: Happy Gilmore.

"WITH".

Correctly! 10 points - the blue team. Question 2 ...

This is an illustrated example illustrating my problem in the shortest, clearest way before you wonder why teams should be involved.

My Instinct / Naive approach

--, . , , AnswerQuestionIntent, "A", "B", "C" "D.", SetTeamIntent, "" "".

~ 100 . , session 'currentQuestion' 0. AnswerQuestionIntent, / , , 9, ; , .

, Alexa . , "team" ( "" "" ) "" ( "A", "B", "C" "D",). SetTeamIntent {team} AnswerQuestionIntent {answer}, developer.amazon.com "Bad Request", .

SDK GitHub, , , , - , .

+4
1

.

1. ElicitSlot

, , elicitslot.

. , {team} {answer} PlayGameIntent. , " ".

: PlayGameIntent. elicit slot. - .

{
  "version": "1.0",
  "sessionAttributes": {},
  "response": {
    "outputSpeech": {
      "type": "PlainText",
      "text": "What team are you on? Blue or Red? "
      },
    "shouldEndSession": false,
    "directives": [
      {
        "type": "Dialog.ElicitSlot",
        "slotToElicit": "team",
        "updatedIntent": {
          "name": "PlayGameIntent",
          "confirmationStatus": "NONE",
          "slots": {
            "team": {
              "name": "team",
              "confirmationStatus": "NONE"
            },
            "answer": {
              "name": "answer",
              "confirmationStatus": "NONE"
            }
          }
        }
      }
    ]
  }
}

{team}, Alexa IntentRequest PlayGameIntent. , , .

2.

. , . - Skill Builder, .

:

AnswerQuestionIntent {answer}
SetTeamIntent {team}
+1

Source: https://habr.com/ru/post/1691509/


All Articles