How can I define Slot Priority for Slot Values in an Intent in LexV2

0

I am trying to build my Lex Bot but receiving this error message

Details Recommended action Slot ids [NumberTwo, Number] don't define a slot priority. Update the intent to add a priority to these slots. - Slot ids [Number] don't define a slot priority. Update the intent to add a priority to these slots. - Slot ids [Answer] don't define a slot priority. Update the intent to add a priority to these slots. - Slot ids [Number] don't define a slot priority. Update the intent to add a priority to these slots. -

I am using AWS SDK for Lex with Python to create the bot.

How can I update the intent to add slot priority for my slots?

Thanks

已提问 1 年前613 查看次数
2 回答
0
已接受的回答

Hello The typical steps when creating bots via api are as follows

  1. Create bot
  2. Create bot version or use draft
  3. Create bot locale
  4. Create intents in the locale
  5. Create slots inside the intent
  6. Update the intent with the slot priority list - This is the step you are missing. Once you have the slot ids you should populate the slotPriorities list inside intent - https://docs.aws.amazon.com/lexv2/latest/APIReference/API_UpdateIntent.html#lexv2-UpdateIntent-request-slotPriorities
  7. Build the bot Let us know if this works for you.

Thanks!

AWS
Don
已回答 1 年前
0

Thanks. Using this UpdateIntent operation was the solution.

The python AWS Lex v2 SDK method I used to add slot priorities to and Intent slot were:

  • create_intent
  • create_slot
  • update_intent
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则