in functions/source/lex_custom_lambda/chatbot_utils.py [0:0]
def get_slots():
current_slots.clear()
try:
next_token = ''
while True:
get_slot_types_response = lex_client.get_slot_types(maxResults=50, nextToken=next_token)
for slot in get_slot_types_response['slotTypes']:
slot_name = slot['name']
current_slots[slot_name] = slot
if 'nextToken' in get_slot_types_response:
next_token = get_slot_types_response['nextToken']
else:
break
except Exception as ex:
logger.error("Exception during get slots lex API call : " + str(ex))
raise