ask_smapi_model.v1.skill.interaction_model package

Subpackages

Submodules

Note

Canonical imports have been added in the __init__.py of the package. This helps in importing the class directly from the package, than through the module.

For eg: if package a has module b with class C, you can do from a import C instead of from a.b import C.

ask_smapi_model.v1.skill.interaction_model.catalog_value_supplier module

class ask_smapi_model.v1.skill.interaction_model.catalog_value_supplier.CatalogValueSupplier(value_catalog=None)

Bases: ask_smapi_model.v1.skill.interaction_model.value_supplier.ValueSupplier

Supply slot values from catalog(s).

Parameters:value_catalog ((optional) ask_smapi_model.v1.skill.interaction_model.value_catalog.ValueCatalog) –
attribute_map = {'object_type': 'type', 'value_catalog': 'valueCatalog'}
deserialized_types = {'object_type': 'str', 'value_catalog': 'ask_smapi_model.v1.skill.interaction_model.value_catalog.ValueCatalog'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type module

class ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type.DelegationStrategyType

Bases: enum.Enum

Enumerates delegation strategies used to control automatic dialog management through the defined dialog model. When no delegation strategies are defined, the value SKILL_RESPONSE is assumed.

Allowed enum values: [ALWAYS, SKILL_RESPONSE]

ALWAYS = 'ALWAYS'
SKILL_RESPONSE = 'SKILL_RESPONSE'
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.dialog module

class ask_smapi_model.v1.skill.interaction_model.dialog.Dialog(delegation_strategy=None, intents=None)

Bases: object

Defines dialog rules e.g. slot elicitation and validation, intent chaining etc.

Parameters:
attribute_map = {'delegation_strategy': 'delegationStrategy', 'intents': 'intents'}
deserialized_types = {'delegation_strategy': 'ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type.DelegationStrategyType', 'intents': 'list[ask_smapi_model.v1.skill.interaction_model.dialog_intents.DialogIntents]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.dialog_intents module

class ask_smapi_model.v1.skill.interaction_model.dialog_intents.DialogIntents(name=None, delegation_strategy=None, slots=None, confirmation_required=None, prompts=None)

Bases: object

Parameters:
attribute_map = {'confirmation_required': 'confirmationRequired', 'delegation_strategy': 'delegationStrategy', 'name': 'name', 'prompts': 'prompts', 'slots': 'slots'}
deserialized_types = {'confirmation_required': 'bool', 'delegation_strategy': 'ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type.DelegationStrategyType', 'name': 'str', 'prompts': 'ask_smapi_model.v1.skill.interaction_model.dialog_intents_prompts.DialogIntentsPrompts', 'slots': 'list[ask_smapi_model.v1.skill.interaction_model.dialog_slot_items.DialogSlotItems]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.dialog_intents_prompts module

class ask_smapi_model.v1.skill.interaction_model.dialog_intents_prompts.DialogIntentsPrompts(elicitation=None, confirmation=None)

Bases: object

Collection of prompts for this intent.

Parameters:
  • elicitation ((optional) str) – Enum value in the dialog_slots map to reference the elicitation prompt id.
  • confirmation ((optional) str) – Enum value in the dialog_slots map to reference the confirmation prompt id.
attribute_map = {'confirmation': 'confirmation', 'elicitation': 'elicitation'}
deserialized_types = {'confirmation': 'str', 'elicitation': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.dialog_prompts module

class ask_smapi_model.v1.skill.interaction_model.dialog_prompts.DialogPrompts(elicitation=None, confirmation=None)

Bases: object

Dialog prompts associated with this slot i.e. for elicitation and/or confirmation.

Parameters:
  • elicitation ((optional) str) – Reference to a prompt-id to use If this slot value is missing.
  • confirmation ((optional) str) – Reference to a prompt-id to use to confirm the slots value.
attribute_map = {'confirmation': 'confirmation', 'elicitation': 'elicitation'}
deserialized_types = {'confirmation': 'str', 'elicitation': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.dialog_slot_items module

class ask_smapi_model.v1.skill.interaction_model.dialog_slot_items.DialogSlotItems(name=None, object_type=None, elicitation_required=None, confirmation_required=None, prompts=None, validations=None)

Bases: object

Parameters:
attribute_map = {'confirmation_required': 'confirmationRequired', 'elicitation_required': 'elicitationRequired', 'name': 'name', 'object_type': 'type', 'prompts': 'prompts', 'validations': 'validations'}
deserialized_types = {'confirmation_required': 'bool', 'elicitation_required': 'bool', 'name': 'str', 'object_type': 'str', 'prompts': 'ask_smapi_model.v1.skill.interaction_model.dialog_prompts.DialogPrompts', 'validations': 'list[ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.has_entity_resolution_match module

class ask_smapi_model.v1.skill.interaction_model.has_entity_resolution_match.HasEntityResolutionMatch(prompt=None)

Bases: ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation

The hasEntityResolutionMatch would allow Alexa to trigger a re-prompt when the status produced by ER is "ER_SUCCESS_NO_MATCH".

Parameters:prompt ((optional) str) – The prompt id that should be used if validation fails.
attribute_map = {'object_type': 'type', 'prompt': 'prompt'}
deserialized_types = {'object_type': 'str', 'prompt': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.intent module

class ask_smapi_model.v1.skill.interaction_model.intent.Intent(name=None, slots=None, samples=None)

Bases: object

The set of intents your service can accept and process.

Parameters:
attribute_map = {'name': 'name', 'samples': 'samples', 'slots': 'slots'}
deserialized_types = {'name': 'str', 'samples': 'list[str]', 'slots': 'list[ask_smapi_model.v1.skill.interaction_model.slot_definition.SlotDefinition]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.interaction_model_data module

class ask_smapi_model.v1.skill.interaction_model.interaction_model_data.InteractionModelData(version=None, description=None, interaction_model=None)

Bases: object

Parameters:
attribute_map = {'description': 'description', 'interaction_model': 'interactionModel', 'version': 'version'}
deserialized_types = {'description': 'str', 'interaction_model': 'ask_smapi_model.v1.skill.interaction_model.interaction_model_schema.InteractionModelSchema', 'version': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.interaction_model_schema module

class ask_smapi_model.v1.skill.interaction_model.interaction_model_schema.InteractionModelSchema(language_model=None, dialog=None, prompts=None)

Bases: object

Parameters:
attribute_map = {'dialog': 'dialog', 'language_model': 'languageModel', 'prompts': 'prompts'}
deserialized_types = {'dialog': 'ask_smapi_model.v1.skill.interaction_model.dialog.Dialog', 'language_model': 'ask_smapi_model.v1.skill.interaction_model.language_model.LanguageModel', 'prompts': 'list[ask_smapi_model.v1.skill.interaction_model.prompt.Prompt]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.is_greater_than module

class ask_smapi_model.v1.skill.interaction_model.is_greater_than.IsGreaterThan(prompt=None, value=None)

Bases: ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation

Validates that slot value is greater than the specified value.

Parameters:
  • prompt ((optional) str) – The prompt id that should be used if validation fails.
  • value ((optional) str) – Value to compare to.
attribute_map = {'object_type': 'type', 'prompt': 'prompt', 'value': 'value'}
deserialized_types = {'object_type': 'str', 'prompt': 'str', 'value': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.is_greater_than_or_equal_to module

class ask_smapi_model.v1.skill.interaction_model.is_greater_than_or_equal_to.IsGreaterThanOrEqualTo(prompt=None, value=None)

Bases: ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation

Validates that slot value is greater than or equals to the specified value.

Parameters:
  • prompt ((optional) str) – The prompt id that should be used if validation fails.
  • value ((optional) str) – Value to compare to.
attribute_map = {'object_type': 'type', 'prompt': 'prompt', 'value': 'value'}
deserialized_types = {'object_type': 'str', 'prompt': 'str', 'value': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.is_in_duration module

class ask_smapi_model.v1.skill.interaction_model.is_in_duration.IsInDuration(prompt=None, start=None, end=None)

Bases: ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation

Validates that the given date or time (as a slot value) is in a given interval. Unlike other range validations, duration based validations lets the developer define a dynamic range of date or time using ISO_8601 Duration Format. Based on the given 'start' and 'end' parameters an interval is created. The slot value given by the skill's user at runtime is then validated inside this interval. Both 'start' and 'end' parameters are in reference to the current date/time. Here the current date/time refers to the date/time when the skill's user made the request.

Parameters:
  • prompt ((optional) str) – The prompt id that should be used if validation fails.
  • start ((optional) str) –
    • `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format.
  • end ((optional) str) –
    • `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format.
attribute_map = {'end': 'end', 'object_type': 'type', 'prompt': 'prompt', 'start': 'start'}
deserialized_types = {'end': 'str', 'object_type': 'str', 'prompt': 'str', 'start': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.is_in_set module

class ask_smapi_model.v1.skill.interaction_model.is_in_set.IsInSet(prompt=None, values=None)

Bases: ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation

Validates if the slot is in the specified set of values.

Parameters:
  • prompt ((optional) str) – The prompt id that should be used if validation fails.
  • values ((optional) list[str]) – List of values to check.
attribute_map = {'object_type': 'type', 'prompt': 'prompt', 'values': 'values'}
deserialized_types = {'object_type': 'str', 'prompt': 'str', 'values': 'list[str]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.is_less_than module

class ask_smapi_model.v1.skill.interaction_model.is_less_than.IsLessThan(prompt=None, value=None)

Bases: ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation

Validates that slot value is less than or equals to the specified value.

Parameters:
  • prompt ((optional) str) – The prompt id that should be used if validation fails.
  • value ((optional) str) – Value to compare to.
attribute_map = {'object_type': 'type', 'prompt': 'prompt', 'value': 'value'}
deserialized_types = {'object_type': 'str', 'prompt': 'str', 'value': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.is_less_than_or_equal_to module

class ask_smapi_model.v1.skill.interaction_model.is_less_than_or_equal_to.IsLessThanOrEqualTo(prompt=None, value=None)

Bases: ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation

Validates that slot value is less than or equals to the specified value.

Parameters:
  • prompt ((optional) str) – The prompt id that should be used if validation fails.
  • value ((optional) str) – Value to compare to.
attribute_map = {'object_type': 'type', 'prompt': 'prompt', 'value': 'value'}
deserialized_types = {'object_type': 'str', 'prompt': 'str', 'value': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.is_not_in_duration module

class ask_smapi_model.v1.skill.interaction_model.is_not_in_duration.IsNotInDuration(prompt=None, start=None, end=None)

Bases: ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation

Validates that the given date or time (as a slot value) is not in a given interval. Unlike other range validations, duration based validations lets the developer define a dynamic range of date or time using ISO_8601 Duration Format. Based on the given 'start' and 'end' parameters an interval is created. The slot value given by the skill's user at runtime is then validated inside this interval. Both 'start' and 'end' parameters are in reference to the current date/time. Here the current date/time refers to the date/time when the skill's user made the request.

Parameters:
  • prompt ((optional) str) – The prompt id that should be used if validation fails.
  • start ((optional) str) –
    • `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format.
  • end ((optional) str) –
    • `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format.
attribute_map = {'end': 'end', 'object_type': 'type', 'prompt': 'prompt', 'start': 'start'}
deserialized_types = {'end': 'str', 'object_type': 'str', 'prompt': 'str', 'start': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.is_not_in_set module

class ask_smapi_model.v1.skill.interaction_model.is_not_in_set.IsNotInSet(prompt=None, values=None)

Bases: ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation

Validates if the slot is not in the specified set of values.

Parameters:
  • prompt ((optional) str) – The prompt id that should be used if validation fails.
  • values ((optional) list[str]) – List of values to check.
attribute_map = {'object_type': 'type', 'prompt': 'prompt', 'values': 'values'}
deserialized_types = {'object_type': 'str', 'prompt': 'str', 'values': 'list[str]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.language_model module

class ask_smapi_model.v1.skill.interaction_model.language_model.LanguageModel(invocation_name=None, types=None, intents=None, model_configuration=None)

Bases: object

Define the language model.

Parameters:
attribute_map = {'intents': 'intents', 'invocation_name': 'invocationName', 'model_configuration': 'modelConfiguration', 'types': 'types'}
deserialized_types = {'intents': 'list[ask_smapi_model.v1.skill.interaction_model.intent.Intent]', 'invocation_name': 'str', 'model_configuration': 'ask_smapi_model.v1.skill.interaction_model.model_configuration.ModelConfiguration', 'types': 'list[ask_smapi_model.v1.skill.interaction_model.slot_type.SlotType]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.prompt module

class ask_smapi_model.v1.skill.interaction_model.prompt.Prompt(id=None, variations=None)

Bases: object

Parameters:
attribute_map = {'id': 'id', 'variations': 'variations'}
deserialized_types = {'id': 'str', 'variations': 'list[ask_smapi_model.v1.skill.interaction_model.prompt_items.PromptItems]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.prompt_items module

class ask_smapi_model.v1.skill.interaction_model.prompt_items.PromptItems(object_type=None, value=None)

Bases: object

Parameters:
attribute_map = {'object_type': 'type', 'value': 'value'}
deserialized_types = {'object_type': 'ask_smapi_model.v1.skill.interaction_model.prompt_items_type.PromptItemsType', 'value': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.prompt_items_type module

class ask_smapi_model.v1.skill.interaction_model.prompt_items_type.PromptItemsType

Bases: enum.Enum

Prompt can be specified in different formats e.g. text, ssml.

Allowed enum values: [SSML, PlainText]

PlainText = 'PlainText'
SSML = 'SSML'
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.slot_definition module

class ask_smapi_model.v1.skill.interaction_model.slot_definition.SlotDefinition(name=None, object_type=None, multiple_values=None, samples=None)

Bases: object

Slot definition.

Parameters:
  • name ((optional) str) – The name of the slot.
  • object_type ((optional) str) – The type of the slot. It can be a built-in or custom type.
  • multiple_values ((optional) ask_smapi_model.v1.skill.interaction_model.multiple_values_config.MultipleValuesConfig) – Configuration object for multiple values capturing behavior for this slot.
  • samples ((optional) list[str]) – Phrases the user can speak e.g. to trigger an intent or provide value for a slot elicitation.
attribute_map = {'multiple_values': 'multipleValues', 'name': 'name', 'object_type': 'type', 'samples': 'samples'}
deserialized_types = {'multiple_values': 'ask_smapi_model.v1.skill.interaction_model.multiple_values_config.MultipleValuesConfig', 'name': 'str', 'object_type': 'str', 'samples': 'list[str]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.slot_type module

class ask_smapi_model.v1.skill.interaction_model.slot_type.SlotType(name=None, values=None, value_supplier=None)

Bases: object

Custom slot type to define a list of possible values for a slot. Used for items that are not covered by Amazon's built-in slot types.

Parameters:
attribute_map = {'name': 'name', 'value_supplier': 'valueSupplier', 'values': 'values'}
deserialized_types = {'name': 'str', 'value_supplier': 'ask_smapi_model.v1.skill.interaction_model.value_supplier.ValueSupplier', 'values': 'list[ask_smapi_model.v1.skill.interaction_model.type_value.TypeValue]'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.slot_validation module

class ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation(object_type=None, prompt=None)

Bases: object

Validation on a slot with support for prompt and confirmation.

Parameters:
  • object_type ((optional) str) – The exact type of validation e.g. isLessThan,isGreaterThan etc.
  • prompt ((optional) str) – The prompt id that should be used if validation fails.
attribute_map = {'object_type': 'type', 'prompt': 'prompt'}
deserialized_types = {'object_type': 'str', 'prompt': 'str'}
discriminator_value_class_map = {'hasEntityResolutionMatch': 'ask_smapi_model.v1.skill.interaction_model.has_entity_resolution_match.HasEntityResolutionMatch', 'isGreaterThan': 'ask_smapi_model.v1.skill.interaction_model.is_greater_than.IsGreaterThan', 'isGreaterThanOrEqualTo': 'ask_smapi_model.v1.skill.interaction_model.is_greater_than_or_equal_to.IsGreaterThanOrEqualTo', 'isInDuration': 'ask_smapi_model.v1.skill.interaction_model.is_in_duration.IsInDuration', 'isInSet': 'ask_smapi_model.v1.skill.interaction_model.is_in_set.IsInSet', 'isLessThan': 'ask_smapi_model.v1.skill.interaction_model.is_less_than.IsLessThan', 'isLessThanOrEqualTo': 'ask_smapi_model.v1.skill.interaction_model.is_less_than_or_equal_to.IsLessThanOrEqualTo', 'isNotInDuration': 'ask_smapi_model.v1.skill.interaction_model.is_not_in_duration.IsNotInDuration', 'isNotInSet': 'ask_smapi_model.v1.skill.interaction_model.is_not_in_set.IsNotInSet'}
classmethod get_real_child_model(data)

Returns the real base class specified by the discriminator

json_discriminator_key = 'type'
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.value_catalog module

class ask_smapi_model.v1.skill.interaction_model.value_catalog.ValueCatalog(catalog_id=None, version=None)

Bases: object

Catalog reference to provide values.

Parameters:
  • catalog_id ((optional) str) – CatalogId.
  • version ((optional) str) – Catalog version.
attribute_map = {'catalog_id': 'catalogId', 'version': 'version'}
deserialized_types = {'catalog_id': 'str', 'version': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_smapi_model.v1.skill.interaction_model.value_supplier module

class ask_smapi_model.v1.skill.interaction_model.value_supplier.ValueSupplier(object_type=None)

Bases: object

Supplier object to provide slot values.

Parameters:object_type ((optional) str) – The exact type of validation e.g.CatalogValueSupplier etc.

Note

This is an abstract class. Use the following mapping, to figure out the model class to be instantiated, that sets type variable.


InlineValueSupplier: ask_smapi_model.v1.skill.interaction_model.inline_value_supplier.InlineValueSupplier
attribute_map = {'object_type': 'type'}
deserialized_types = {'object_type': 'str'}
discriminator_value_class_map = {'CatalogValueSupplier': 'ask_smapi_model.v1.skill.interaction_model.catalog_value_supplier.CatalogValueSupplier', 'InlineValueSupplier': 'ask_smapi_model.v1.skill.interaction_model.inline_value_supplier.InlineValueSupplier'}
classmethod get_real_child_model(data)

Returns the real base class specified by the discriminator

json_discriminator_key = 'type'
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model