in source/services/lex-bot/order_pizza/intent.py [0:0]
def update_order_intent(intent_id, bot_id, locale_id, slot_ids):
bot_language = os.environ.get("botLanguage")
response = client.update_intent(
intentId=intent_id,
intentName="PizzaOrder",
description="PizzaOrder intent created by serverless bot.",
sampleUtterances=order_utterances(bot_language),
dialogCodeHook={"enabled": True},
fulfillmentCodeHook={"enabled": True},
intentConfirmationSetting={
"promptSpecification": {
"messageGroups": [
{"message": {"plainTextMessage": {"value": "confirmed"}}},
],
"maxRetries": 5,
"allowInterrupt": True,
},
"declinationResponse": {
"messageGroups": [
{"message": {"plainTextMessage": {"value": "declined"}}},
],
"allowInterrupt": True,
},
},
slotPriorities=[
{
"priority": 1,
"slotId": slot_ids[0],
},
{
"priority": 2,
"slotId": slot_ids[1],
},
{
"priority": 3,
"slotId": slot_ids[2],
},
{
"priority": 4,
"slotId": slot_ids[3],
},
],
botId=bot_id,
botVersion="DRAFT",
localeId=locale_id,
)
logger.info(response)