Categories:
Aura Bot generic-dialog-v3
Dialog based on a simple configuration that allows managing several experiences for TV channels. This version is compatible with channelData v3.
Introduction
The generic-dialog-v3 allows OBs to implement certain local use cases for channelData v3 channels in an autonomous, agile and simple way with no code development, only by means of configuration.
You can check its source code in Github: generic-v3-dialog.ts.
Differences between generic dialog v1 and v3
These are the main differences in comparison with the generic-dialog v1:
-
Deprecated fields in dialog’s settings (
dialogLibraries.dialogs.triggerConditions.settings):type,action,payload,addEntitiesToPayload,sound,payloadTypeandisFullScreenare no longer used.action,payloadandsoundconfigurations will be transformed to the new actions format and added to the new fieldactions.
-
New field
actions: This field contains the configuration of all the actions returned inside thechannelData.
Generic dialog environment variables
Generic
| Property | Type | Scope | Description |
|---|---|---|---|
| TV_VOLUME_LEVELS_UP_DOWN | number | Local | Number of points at which the volume can be raised and lowered. By default 5. |
| TV_MOVE_SECONDS_BACKWARD_FORWARD | number | Local | Number of seconds in which user can forward or rewind a video. By default 60. |
| WIFI_FP_SMART_WIFI_ENDPOINT | string | Local | URL Kernel endpoint endpoint to interact with smart wifi API. |
| TV_TIMER_RECOGNIZER_FIRST_ENTITY_CONFIG | string | Local | Configuration of the recognition of entities with timer content in first position to calculate number of seconds. By default: 1 4:0.25,3 4s:0.75,4 de hora:0.25,hora:1.0,media:0.5,medio:0.5,minuto:1.0,un:1.0,un 4:0.25,una:1.0. |
| TV_TIMER_RECOGNIZER_SECOND_ENTITY_CONFIG | string | Local | Configuration of recognition of entities with timer content in second position to calculate number of seconds. By default: 1 4:0.25,3 4s:0.75,4 de hora:0.25,hora:1.0,media:0.5,medio:0.5,minuto:1.0,un:1.0,un 4:0.25,una:1.0,4:0.25. |
Generic dialog utilities
There are several functions that implement different requirements for the generic-dialog such as:
calculateSecondLevels: Calculate the value in seconds in case the entity type is not expressed in this format:ent.time_length_sec. Right now it only converts minutes into seconds.getIndexedText: Get the text’s reference with information about the entity value.getInfoWifiPlus: Retrieve Wi-Fi info.getSecondsLevelsWithTimerRecognizer: Calculates the total number of seconds, based on the provided timer entities, making a recognition and conversion of them depending on the configuration of each country. The configuration is added in the environment variables:TV_TIMER_RECOGNIZER_FIRST_ENTITY_CONFIGandTV_TIMER_RECOGNIZER_SECOND_ENTITY_CONFIG.getWifiInfo: Manage Wi-Fi data by setting the persistentData and the value of movistarPlusResolution.
AI fallback resolution
The configuration and fallback mechanism for AI resolution in generic-dialog-v3 are the same as in generic-dialog v1.
The only difference is in the second fallback condition:
- In generic-dialog v1, the fallback is triggered when Movistar Plus resolution returns no results.
- In generic-dialog v3, the fallback is triggered when the complex logic resolution process returns no results.
All other aspects (configuration with enableAIResolution, marking the interaction origin as InteractionOriginType.NoResults, and redirecting to the new dialog) remain exactly the same.