Skip to content

Commit

Permalink
Add slots to sessionAttributes and elicit CollectionName slot
Browse files Browse the repository at this point in the history
  • Loading branch information
FloRul committed Feb 3, 2024
1 parent 4f30de4 commit 2388746
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions list_collections/src/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,23 @@ def lambda_handler(event, context):
"name": "ListCollections",
"state": "Fulfilled",
"confirmationState": "None",
"slots": sessionAttributes,
},
"sessionAttributes": sessionAttributes,
},
"messages": [
{
"contentType": "PlainText",
"content": "Voici les sources de données disponibles :",
}
},
{
"contentType": "PlainText",
"content": "Please choose an option",
"messageType": "ElicitSlot",
"slotToElicit": "CollectionName",
},
],
"requestAttributes": {},
"dialogAction": {
"type": "ElicitSlot",
"intentName": "ListCollections",
"slotToElicit": "CollectionName",
"slots": sessionAttributes,
},
}
except Exception as e:
print(f"Error querying the database: {e}")
Expand Down

0 comments on commit 2388746

Please sign in to comment.