This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
generic-ai-dialog
Aura bot generic-ai-dialog
Description of Aura bot generic-ai-dialog, that allows managing several experiences for TV channels using AI services and complex logic resolution.
Introduction
The aura-bot-generic-ai-library library includes the following list of dialogs:
1 - Generic AI Dialog v1
Aura Bot generic-ai-dialog-v1
Description of Aura bot generic-ai-dialog-v1, that allows managing several experiences for TV channels using AI services and complex logic resolution.
Introduction
The generic-ai-dialog-v1 allows OBs to implement search and recommendation use cases for TV channels based on AI services and complex logic resolution for channelData v1 channels.
You can check its source code in Github: generic-ai-dialog-v1.ts.
Environment variables
| Property |
Type |
Description |
Mandatory |
| AURA_AUTHORIZATION_HEADER |
string |
Authorization header to be sent to AURA_GATEWAY_API_ENDPOINT |
yes |
| AURA_COMPLEX_LOGIC_ENDPOINT |
string |
URL of Complex Logic endpoint to interact with resolution API. |
yes |
| AURA_GATEWAY_API_ENDPOINT |
string |
URL of Aura Gateway API endpoint |
yes |
| AURA_GATEWAY_API_ISSUER_URL |
string |
Issuer URL for token info |
yes |
| AURA_CHANNELDATA_DEFAULT_VERSION |
string |
Default version of channelData. By default 1.0.0. |
no |
| AURA_CHANNELDATA_LA_DEFAULT_VERSION |
string |
Default version of channelData for Latin America. By default 2.0.0. |
no |
| GENERIC_MP_RESOLUTION_NO_RESULT_CODE |
string[] |
List of resolution codes that indicate no results found. By default ['211', '462']. |
no |
How it works
The dialog works in a similar way to the generic-ai-dialog-v3 but adapted to the structure of channelData v1.
Complex Logic proxy is used to interact with Complex Logic resolution API, which returns a response similar to Movistar Plus Resolution API. This adaptation is only valid for TVSearch responses for STB channel, because only a subset of fields has been mapped from normalized TV API to legacy TV API.
2 - Generic AI Dialog v3
Aura Bot generic-ai-dialog-v3
Description of Aura bot generic-ai-dialog-v3, that allows managing several experiences for TV channels using AI services and complex logic resolution.
Introduction
The generic-ai-dialog-v3 allows OBs to implement search and recommendation use cases for TV channels based on AI services and complex logic resolution for channelData v3 channels.
You can check its source code in Github: generic-ai-dialog-v3.ts.
Environment variables
| Property |
Type |
Description |
Mandatory |
| AURA_AUTHORIZATION_HEADER |
string |
Authorization header to be sent to AURA_GATEWAY_API_ENDPOINT |
yes |
| AURA_COMPLEX_LOGIC_ENDPOINT |
string |
URL of Complex Logic endpoint to interact with resolution API. |
yes |
| AURA_GATEWAY_API_ENDPOINT |
string |
URL of Aura Gateway API endpoint |
yes |
| AURA_GATEWAY_API_ISSUER_URL |
string |
Issuer URL for token info |
yes |
| AURA_CHANNELDATA_DEFAULT_VERSION |
string |
Default version of channelData. By default 1.0.0. |
no |
| AURA_CHANNELDATA_LA_DEFAULT_VERSION |
string |
Default version of channelData for Latin America. By default 2.0.0. |
no |
Adding configurations for the AI Service
To use the AI Service, you need to add the intent configurations to the channel settings. The configurations should be added in the following format:
{
"atria": {
"dialogs": {
"intent.tv.retrieve": {
"applicationId": "816bdab6-3ea3-4a77-bdea-12945d6d7053",
"presetId": "5d06f26c-a8d8-4f45-a999-102aaa8b191b"
}
}
}
}
With this configuration, when the generic-ia-dialog-v3 is called with the intent intent.tv.retrieve, it will use the specified applicationId and presetId to call the generative API.
How it works
Steps
- The dialog starts by retrieving the intent information from the context and logging the start of the dialog.
- Then, it calls the AI service to get a generative response based on the intent and the current session ID. The session ID is updated in the context for future requests.
- Next, it calls the complex logic service to get a resolution based on the intent and entities from the generative response.
- If the resolution indicates no content found, it redirects to the conversational-search dialog.
- Otherwise, it builds an activity to be sent to the user using the intent result, intent settings, and resolution.
- If any error occurs during these steps, it logs the error, sets the error in the context, and builds an activity from the error.
- Finally, it sends the activity to the user and ends the dialog.
Sequence diagram
sequenceDiagram
autonumber
participant User
participant Dialog
participant AI Services
participant Complex Logic
participant Conversational Search
Dialog->>Dialog: Retrieve intent information from context
Dialog->>AI Services: Call AI service with intent and session ID
AI Services->>Dialog: Return generative response and session ID
Dialog->>Complex Logic: Call complex logic service with intent and entities
Complex Logic->>Dialog: Return resolution
alt No content found in resolution
Dialog->>Conversational Search: Redirect to conversational-search dialog
else Content found
Dialog->>Dialog: Build activity with intent result, intent settings, and resolution
Dialog->>User: Send activity to user
end
Dialog->>Dialog: End dialog