<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Aura – </title>
    <link>/docs/components/global-use-cases/generic-ai-dialogs/</link>
    <description>Recent content on Aura</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="/docs/components/global-use-cases/generic-ai-dialogs/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/global-use-cases/generic-ai-dialogs/generic-ai-dialog-v1/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/global-use-cases/generic-ai-dialogs/generic-ai-dialog-v1/</guid>
      <description>
        
        
        &lt;h1 id=&#34;aura-bot-generic-ai-dialog-v1&#34;&gt;Aura Bot generic-ai-dialog-v1&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Description of Aura bot generic-ai-dialog-v1, that allows managing several experiences for TV channels using AI services and complex logic resolution.&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;The &lt;em&gt;&lt;strong&gt;generic-ai-dialog-v1&lt;/strong&gt;&lt;/em&gt; allows OBs to implement search and recommendation use cases for TV channels based on AI services and complex logic resolution for &lt;a href=&#34;../../../../docs/components/request-response-model/channeldata-v1/&#34;&gt;&lt;code&gt;channelData&lt;/code&gt; v1&lt;/a&gt; channels.&lt;/p&gt;
&lt;p&gt;You can check its source code in Github: &lt;a href=&#34;https://github.com/Telefonica/aura-bot-libraries/blob/master/packages/generic-ai/src/dialogs/generic-ai-dialog-v1.ts&#34;&gt;generic-ai-dialog-v1.ts&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;environment-variables&#34;&gt;Environment variables&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Mandatory&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AURA_AUTHORIZATION_HEADER&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Authorization header to be sent to &lt;code&gt;AURA_GATEWAY_API_ENDPOINT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AURA_COMPLEX_LOGIC_ENDPOINT&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;URL of &lt;strong&gt;Complex Logic&lt;/strong&gt; endpoint to interact with resolution API.&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AURA_GATEWAY_API_ENDPOINT&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;URL of &lt;strong&gt;Aura Gateway API&lt;/strong&gt; endpoint&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AURA_GATEWAY_API_ISSUER_URL&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Issuer URL for token info&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AURA_CHANNELDATA_DEFAULT_VERSION&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Default version of channelData. By default &lt;code&gt;1.0.0&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AURA_CHANNELDATA_LA_DEFAULT_VERSION&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Default version of channelData for Latin America. By default &lt;code&gt;2.0.0&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GENERIC_MP_RESOLUTION_NO_RESULT_CODE&lt;/td&gt;
&lt;td&gt;string[]&lt;/td&gt;
&lt;td&gt;List of resolution codes that indicate no results found. By default &lt;code&gt;[&#39;211&#39;, &#39;462&#39;]&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;how-it-works&#34;&gt;How it works&lt;/h2&gt;
&lt;p&gt;The dialog works in a similar way to the &lt;a href=&#34;../../../../docs/components/global-use-cases/generic-ai-dialogs/generic-dialog-v3/&#34;&gt;generic-ai-dialog-v3&lt;/a&gt; but adapted to the structure of &lt;code&gt;channelData&lt;/code&gt; v1.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Complex Logic proxy&lt;/strong&gt;&lt;/em&gt; is used to interact with &lt;em&gt;&lt;strong&gt;Complex Logic resolution API&lt;/strong&gt;&lt;/em&gt;, which returns a response similar to &lt;em&gt;Movistar Plus Resolution API&lt;/em&gt;. 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.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/global-use-cases/generic-ai-dialogs/generic-ai-dialog-v3/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/global-use-cases/generic-ai-dialogs/generic-ai-dialog-v3/</guid>
      <description>
        
        
        &lt;h1 id=&#34;aura-bot-generic-ai-dialog-v3&#34;&gt;Aura Bot generic-ai-dialog-v3&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Description of Aura bot &lt;em&gt;&lt;strong&gt;generic-ai-dialog-v3&lt;/strong&gt;&lt;/em&gt;, that allows managing several experiences for TV channels using AI services and complex logic resolution.&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;The &lt;em&gt;&lt;strong&gt;generic-ai-dialog-v3&lt;/strong&gt;&lt;/em&gt; allows OBs to implement search and recommendation use cases for TV channels based on AI services and complex logic resolution for &lt;a href=&#34;../../../../docs/components/request-response-model/channeldata-v3/&#34;&gt;&lt;code&gt;channelData&lt;/code&gt; v3&lt;/a&gt; channels.&lt;/p&gt;
&lt;p&gt;You can check its source code in Github: &lt;a href=&#34;https://github.com/Telefonica/aura-bot-libraries/blob/master/packages/generic-ai/src/dialogs/generic-ai-dialog-v3.ts&#34;&gt;generic-ai-dialog-v3.ts&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;environment-variables&#34;&gt;Environment variables&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Mandatory&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AURA_AUTHORIZATION_HEADER&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Authorization header to be sent to &lt;code&gt;AURA_GATEWAY_API_ENDPOINT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AURA_COMPLEX_LOGIC_ENDPOINT&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;URL of &lt;strong&gt;Complex Logic&lt;/strong&gt; endpoint to interact with resolution API.&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AURA_GATEWAY_API_ENDPOINT&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;URL of &lt;strong&gt;Aura Gateway API&lt;/strong&gt; endpoint&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AURA_GATEWAY_API_ISSUER_URL&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Issuer URL for token info&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AURA_CHANNELDATA_DEFAULT_VERSION&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Default version of channelData. By default &lt;code&gt;1.0.0&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AURA_CHANNELDATA_LA_DEFAULT_VERSION&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Default version of channelData for Latin America. By default &lt;code&gt;2.0.0&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;adding-configurations-for-the-ai-service&#34;&gt;Adding configurations for the AI Service&lt;/h2&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;atria&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;dialogs&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;intent.tv.retrieve&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;applicationId&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;816bdab6-3ea3-4a77-bdea-12945d6d7053&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;presetId&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;5d06f26c-a8d8-4f45-a999-102aaa8b191b&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;With this configuration, when the generic-ia-dialog-v3 is called with the intent &lt;code&gt;intent.tv.retrieve&lt;/code&gt;, it will use the specified applicationId and presetId to call the generative API.&lt;/p&gt;
&lt;h2 id=&#34;how-it-works&#34;&gt;How it works&lt;/h2&gt;
&lt;h3 id=&#34;steps&#34;&gt;Steps&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The dialog starts by retrieving the intent information from the context and logging the start of the dialog.&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;Next, it calls the complex logic service to get a resolution based on the intent and entities from the generative response.&lt;/li&gt;
&lt;li&gt;If the resolution indicates no content found, it redirects to the conversational-search dialog.&lt;/li&gt;
&lt;li&gt;Otherwise, it builds an activity to be sent to the user using the intent result, intent settings, and resolution.&lt;/li&gt;
&lt;li&gt;If any error occurs during these steps, it logs the error, sets the error in the context, and builds an activity from the error.&lt;/li&gt;
&lt;li&gt;Finally, it sends the activity to the user and ends the dialog.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;sequence-diagram&#34;&gt;Sequence diagram&lt;/h3&gt;
&lt;pre class=&#34;mermaid&#34;&gt;sequenceDiagram
    autonumber
    participant User
    participant Dialog
    participant AI Services
    participant Complex Logic
    participant Conversational Search
    Dialog-&amp;gt;&amp;gt;Dialog: Retrieve intent information from context
    Dialog-&amp;gt;&amp;gt;AI Services: Call AI service with intent and session ID
    AI Services-&amp;gt;&amp;gt;Dialog: Return generative response and session ID
    Dialog-&amp;gt;&amp;gt;Complex Logic: Call complex logic service with intent and entities
    Complex Logic-&amp;gt;&amp;gt;Dialog: Return resolution
    alt No content found in resolution
        Dialog-&amp;gt;&amp;gt;Conversational Search: Redirect to conversational-search dialog
    else Content found
        Dialog-&amp;gt;&amp;gt;Dialog: Build activity with intent result, intent settings, and resolution
        Dialog-&amp;gt;&amp;gt;User: Send activity to user
    end
    Dialog-&amp;gt;&amp;gt;Dialog: End dialog&lt;/pre&gt;

      </description>
    </item>
    
  </channel>
</rss>
