Skip to content

Instantly share code, notes, and snippets.

@thiagoavadore
Created June 25, 2020 14:12
Show Gist options
  • Save thiagoavadore/650a2cc782e099db5d1900c1fa603a32 to your computer and use it in GitHub Desktop.
Save thiagoavadore/650a2cc782e099db5d1900c1fa603a32 to your computer and use it in GitHub Desktop.
def dispatch(intent_request):
logger.debug(
'dispatch userId={}, intentName={}'.format(intent_request['userId'], intent_request['currentIntent']['name']))
intent_name = intent_request['currentIntent']['name']
if intent_name == 'ScheduleDemo':
return schedule_demo(intent_request)
elif intent_name == 'CheckDemo':
return check_demo(intent_request)
raise Exception('Intent with name ' + intent_name + ' not supported')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment