ask_amy.state_mgr package

Submodules

ask_amy.state_mgr.stack_dialog_mgr module

class ask_amy.state_mgr.stack_dialog_mgr.StackDialogManager(dialog_dict=None)

Bases: ask_amy.core.default_dialog.DefaultDialog

confirmation_intent(confirmation)
get_expected_intent_for_data(data_name)
get_re_prompt_for_slot_data(data_name)
get_slot_data_details(data_name)
handle_session_end_confused()

Called if we are in an intent but don’t have the info to move forward and are not sure how or why alex called us here (obviously this should not be a common occurrence.) :return:

intent_attributes_to_request_attributes()
is_good_state()

Checks the state of the dialog and establish a conversation if this is the first interaction on a multi step intent :return:

is_valid_slot_data_type(name, value, type_validator)

Delegates to the appropriate validator if a type check is defined in the dialog_dict :param name: :param value: :return:

need_valid_data(validation_errors)
no_intent()
peek_established_dialog()

peek at the current intent state :return:

pop_established_dialog()

pop an intent state from the stack :return:

push_established_dialog(intent_name)

Push an intent and its state onto the stack :param intent_name: :return:

redirect_to_initialize_dialog(intent_name)

Simple redirect. We use this if an intent is called but a prior intent was expected :param intent_name: :return:

requested_value_intent()
required_fields_in_session_attributes_to_intent_attributes(required_fields)

Move session data into intent state data. This will stage the data we have already collected that is required to execute the intent. :return:

required_fields_process(required_fields)

review the required fields to process this intent if we have all the data move forward if not create a reply that will call an appropriate intent to get the missing data :param required_fields: :return:

reset_established_dialog()

reset the whole intent dialog stack :return:

slot_data_to_intent_attributes()

Move slot data into intent state data. This will collect the data required to execute the initial intent. (i.e. similar to flow state in JSF) :return:

yes_intent()
ask_amy.state_mgr.stack_dialog_mgr.required_fields(fields, user_managed=False)

Required fields decorator manages the state of the intent :param fields: :param user_managed: :return:

ask_amy.state_mgr.stack_dialog_mgr.with_confirmation()

Required fields decorator manages the state of the intent :return:

Module contents