0

I have built a skill using Python which will fetch me values from an external API. I speak the month name, which is also the slot value, and based on the month name it will get me something. It works well if I speak the name of the month. But if I say; 'last month', it won't recognize it. Although it will work if I am not in the skill and ask something like, 'What was the last month ?'. I get the right response for this case. Any help ?

Vai
  • 343
  • 3
  • 17

1 Answers1

1

For better feedback, please share more information on how your month slot and intents are defined. If you created a custom slot with each month as a value, Alexa is not going to be able to disambiguate such a request unless you split utterances into multiple intents (e.g., LastMonthIntent, ThisMonthIntent, NextMonthIntent) or add additional slot values for next/previous.

As an alternative, I recommend leveraging the AMAZON.DATE built-in slot type, which inherently supports phrases like 'last month' and returns a formatted slot value like '2019-12', respectively.