def _get_bot_slot_types()

in templates/custom-resources/lexutils.py [0:0]


    def _get_bot_slot_types(self):
        # grab associated slot types from source intents
        for intent_name in self._get_intent_responses:
            for slot in self._get_intent_responses[intent_name]['slots']:
                slot_type = slot['slotType']
                # ignore AMAZON and types seen before
                if (not slot_type.startswith('AMAZON.') and
                    not self._get_slot_type_responses.get(slot_type)
                ):
                    try:
                        slot_type_response = self._lex_client.get_slot_type(
                            name=slot_type, version=slot['slotTypeVersion']
                        )
                    except Exception as e:
                        logger.error('Lex get_slot_type call failed')
                        logger.error(e)
                        raise
                    self._get_slot_type_responses[slot_type] = (
                        slot_type_response
                    )

        return self._get_slot_type_responses