{"id":53619,"date":"2023-02-01T07:24:40","date_gmt":"2023-02-01T07:24:40","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=53619"},"modified":"2023-05-11T11:15:23","modified_gmt":"2023-05-11T10:15:23","slug":"configuring-the-openai-action","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/integrations\/configuring-the-openai-action\/","title":{"rendered":"Configuring the OpenAI Action"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div class=\"ult-spacer spacer-6ae865ca5a475\" data-id=\"6ae865ca5a475\" data-height=\"10\" data-height-mobile=\"10\" data-height-tab=\"10\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>The XO Platform lets you easily connect with OpenAI to generate answers to your queries and extract skills from documents.<\/p>\n<p>This article explains how to authorize and enable the <strong>OpenAI<\/strong> action and install the pre-built templates.<\/p>\n<h2 id=\"h.abu5gz1ys41l\"><span class=\"ez-toc-section\" id=\"Authorizations_Supported\">Authorizations Supported<\/span><\/h2>\n<p>The Kore.ai XO Platform supports basic authentication to allow OpenAI integration to exchange data. For more information, read the <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/advanced-topics\/authorization\/bot-authentication\/\">Bot Authorization Overview<\/a>\u00a0article.<\/p>\n<p>The Kore.ai XO Platform supports the following authorization types for the OpenAI integration:<\/p>\n<ul>\n<li><strong>Pre-Authorize the Integration<\/strong>\u00a0&#8211; To make the integration process smoother for developers and customers, you can pre-authorize it by providing the necessary authorization credentials to obtain the access token.<\/li>\n<li><strong>Allow Users to Authorize the Integration <\/strong>\u00a0&#8211; This method requires the end user to provide credentials during the conversation for authorization. This authorization process involves requesting permission for Kore.ai&#8217;s OpenAI app to access an access token at runtime. To learn more about OpenAI account types, see <a href=\"https:\/\/platform.openai.com\/docs\/api-reference\/authentication\">OpenAI documentation<\/a>.<\/li>\n<\/ul>\n<h2 id=\"h.merhe2a7no9u\"><span class=\"ez-toc-section\" id=\"Step_1_Enable_the_OpenAI_Action\">Step 1: Enable the OpenAI Action<\/span><\/h2>\n<p><strong>Prerequisites<\/strong>:<\/p>\n<p>Before enabling the OpenAI action, complete the following prerequisites:<\/p>\n<ul>\n<li>If you already have OpenAI account credentials, then enter them. \u00a0Otherwise, create a developer account\u00a0in the OpenAI and note down login credentials. Use the <a href=\"https:\/\/platform.openai.com\/docs\/api-reference\/introduction\">OpenAI Documentation<\/a>\u00a0for more information.<\/li>\n<li>Copy the API Key of your OpenAI account and keep it for future use to enable the integration.<\/li>\n<\/ul>\n<p>Steps to enable the OpenAI action:<\/p>\n<ol start=\"1\">\n<li>Go to <strong>Build &gt; Integrations <\/strong>and select the <strong>Actions <\/strong>menu item.<\/li>\n<li>Once you click the <strong>Actions <\/strong>menu, all integrations are shown in the <strong>Available <\/strong>region. Select the <strong>OpenAI <\/strong>action<strong>. <\/strong><\/li>\n<\/ol>\n<figure style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/multisite.korebots.com\/multisite-2\/wp-content\/uploads\/sites\/35\/sites\/25\/2023\/01\/pasted-image-0-9.png\" alt=\"Pasted image 0\" \/><\/figure>\n<h3 id=\"h.sszdkg16gq7o\"><span class=\"ez-toc-section\" id=\"Pre-authorize_the_Integration\">Pre-authorize the Integration<\/span><\/h3>\n<p><strong>Basic Auth<\/strong><\/p>\n<p>You can authorize the integration using your credentials. The developer authorization lets you authorize the integration with preconfigured Kore.ai app with the Basic Auth option.<\/p>\n<p>Steps to authorize an OpenAI action using developer credentials:<\/p>\n<ol start=\"1\">\n<li>Go to <strong>Build &gt; Integrations <\/strong>and select the <strong>Actions <\/strong>menu item.<\/li>\n<li>Select the <strong>OpenAI <\/strong>action in the <strong>Available Actions<\/strong>\u00a0region.<\/li>\n<li>In the <strong>Configurations <\/strong>dialog, select the <strong>Authorization <\/strong>tab<\/li>\n<li>Enter the following details:\n<ul>\n<li><strong>Authorization Type<\/strong>\u00a0&#8211; Select the <strong>Pre-authorize the Integration<\/strong>\u00a0option, and then select the <em><strong>Basic Auth <\/strong><\/em>option.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<figure style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/multisite.korebots.com\/multisite-2\/wp-content\/uploads\/sites\/35\/sites\/25\/2023\/01\/pasted-image-0-10.png\" alt=\"Pasted image 0\" \/><\/figure>\n<ul>\n<li><strong>API Key <\/strong>&#8211; The secret API key of your OpenAI account.<br \/>\n<strong>Note<\/strong>: The Platform uses the configured API Key to authorize and generate the suggestions from OpenAI.<\/li>\n<\/ul>\n<ol start=\"5\">\n<li>Click <strong>Enable<\/strong>. When you configure the action for the first time, the <strong>Integration Successful<\/strong>\u00a0 pop-up is displayed.<\/li>\n<\/ol>\n<figure style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/multisite.korebots.com\/multisite-2\/wp-content\/uploads\/sites\/35\/sites\/25\/2023\/01\/pasted-image-0.png\" alt=\"Pasted image 0\" \/><\/figure>\n<p><strong>Note<\/strong>: You will notice the OpenAI action is moved from <em>Available <\/em>to <em>Configured <\/em>region.<\/p>\n<h3 id=\"h.7w9wuubycwmd\"><span class=\"ez-toc-section\" id=\"Allow_End_User_to_Authorize\">Allow End User to Authorize<\/span><\/h3>\n<p>You can authorize the integration at a user level with their login credentials. The user authorization process involves requesting permission for Kore.ai&#8217;s OpenAI app to access an access token at runtime.\u00a0You can also use the basic auth profile to let a user configure the integration at runtime.<\/p>\n<p>Steps to authorize an OpenAI action at a user level:<\/p>\n<ol start=\"1\">\n<li>Go to <strong>Build &gt; Integrations <\/strong>and select the <strong>Actions <\/strong>menu item.<\/li>\n<li>Select the <strong>OpenAI <\/strong>action in the <strong>Available Actions<\/strong>\u00a0region.<\/li>\n<li>In the Configurations dialog, select the <strong>Authorization <\/strong>tab<\/li>\n<li>Enter the following details:\n<ul>\n<li><strong>Authorization Type<\/strong>\u00a0&#8211; Select the <strong>Allow Users to Authorize the Integration<\/strong>\u00a0option, and then select the <em><strong>Basic Auth<\/strong><\/em>\u00a0option.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<figure style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/multisite.korebots.com\/multisite-2\/wp-content\/uploads\/sites\/35\/sites\/25\/2023\/01\/pasted-image-0-4.png\" alt=\"Pasted image 0\" \/><\/figure>\n<ul>\n<li>Create your own authorization profile to obtain an access token and use it to complete integration without using Kore.ai&#8217;s OpenAI app for authorization.\n<ul>\n<li>Click the <strong>Select Authorization<\/strong>\u00a0drop-down and select the <strong>Create New<\/strong>\u00a0option.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure style=\"text-align: center;\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207110413\/open_ai_api_key.png\"><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"844\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207110413\/open_ai_api_key.png\" alt=\"\" class=\"alignnone size-medium wp-image-53740\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207110413\/open_ai_api_key.png 797w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207110413\/open_ai_api_key-283x300.png 283w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/a><\/figure>\n<ul>\n<li>Select the type of authorization mechanism. For example, select the <strong>API Key <\/strong>option. To create Basic Auth profiles, read\u00a0the <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/advanced-topics\/authorization\/bot-authentication\/\">Bot Authorization Overview<\/a>.article.<\/li>\n<\/ul>\n<figure style=\"text-align: center;\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207105946\/open_ai_api_key1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"910\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207105946\/open_ai_api_key1.png\" alt=\"\" class=\"alignnone size-medium wp-image-53734\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207105946\/open_ai_api_key1.png 785w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207105946\/open_ai_api_key1-259x300.png 259w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/a><\/figure>\n<ul>\n<li>Enter the following authentication credentials for the Basic Auth mechanism:\n<ul>\n<li><em>Name <\/em>&#8211; Enter the name for the Basic Auth profile.<\/li>\n<li>Select the <em>Yes, some tasks will have tenancy URLs, and the user will need to provide that to successfully authenticate<\/em>\u00a0option.<\/li>\n<li><em>Base URL<\/em>\u00a0&#8211; Enter the base tenant URL for OpenAI instance.<\/li>\n<li><em>Authorization Check URL<\/em>\u00a0&#8211; Enter the authorization check URL for your OpenAI instance.<\/li>\n<li><em>Description <\/em>&#8211; Enter the description of the basic authentication profile.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure style=\"text-align: center;\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207110210\/open_ai_api_key2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"902\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207110210\/open_ai_api_key2.png\" class=\"alignnone size-medium wp-image-53737\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207110210\/open_ai_api_key2.png 797w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230207110210\/open_ai_api_key2-265x300.png 265w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/a><\/figure>\n<ul>\n<li>Click <strong>Save Auth <\/strong>to save authorization profile.<\/li>\n<li>Select the new <strong>Authorization Profile,<\/strong>\u00a0which you created to complete integration.<\/li>\n<\/ul>\n<figure style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/multisite.korebots.com\/multisite-2\/wp-content\/uploads\/sites\/35\/sites\/25\/2023\/01\/pasted-image-0-6.png\" alt=\"Pasted image 0\" \/><\/figure>\n<ol start=\"5\">\n<li>Click <strong>Enable<\/strong>. When you configure the action for the first time, the <strong>Integration Successful<\/strong>\u00a0 pop-up is displayed.<\/li>\n<\/ol>\n<h2 id=\"h.9d2bevsg4aii\"><span class=\"ez-toc-section\" id=\"Step_2_Install_the_OpenAI_Action_Templates\">Step 2: Install the OpenAI Action Templates<\/span><\/h2>\n<p>Once you have configured an OpenAI integration, you can explore and install action templates.<\/p>\n<p>Steps to install action templates:<\/p>\n<ol start=\"1\">\n<li>On the Integration Successful dialog, click the <strong>Explore Templates<\/strong>\u00a0button to view the templates.<\/li>\n<\/ol>\n<figure style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/multisite.korebots.com\/multisite-2\/wp-content\/uploads\/sites\/35\/sites\/25\/2023\/01\/pasted-image-0-7.png\" alt=\"Pasted image 0\" \/><\/figure>\n<ol start=\"2\">\n<li>In the Integration Templates dialog, click the <strong>Install <\/strong>button to begin the installation.<\/li>\n<\/ol>\n<figure style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/multisite.korebots.com\/multisite-2\/wp-content\/uploads\/sites\/35\/sites\/25\/2023\/01\/pasted-image-0-8.png\" alt=\"Pasted image 0\" \/><\/figure>\n<ol start=\"3\">\n<li>Once the template is installed, click the <strong>Go to Dialog<\/strong>\u00a0button to view the dialog task.<\/li>\n<li>Once all templates are installed, a dialog task for each template is auto-created.<\/li>\n<\/ol>\n<figure style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/multisite.korebots.com\/multisite-2\/wp-content\/uploads\/sites\/35\/sites\/25\/2023\/01\/pasted-image-0-1.png\" alt=\"Pasted image 0\" \/><\/figure>\n<ol start=\"5\">\n<li>You can also select the desired dialog task from the templates and click <strong>Proceed<\/strong>. For example, select the <strong>Extract Skills from the resume <\/strong>task.<\/li>\n<\/ol>\n<figure style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/multisite.korebots.com\/multisite-2\/wp-content\/uploads\/sites\/35\/sites\/25\/2023\/01\/pasted-image-0-2.png\" alt=\"Pasted image 0\" \/><\/figure>\n<ol start=\"6\">\n<li>Once you click <strong>Proceed<\/strong>, the dialog task is auto-created, and the canvas opens with all required entity nodes, service nodes, and message scripts.<\/li>\n<figure style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/multisite.korebots.com\/multisite-2\/wp-content\/uploads\/sites\/35\/sites\/25\/2023\/01\/pasted-image-0-3.png\" alt=\"Pasted image 0\" \/><\/figure>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"The XO Platform lets you easily connect with OpenAI to generate answers to your queries and extract skills from documents. This article explains how to authorize and enable the OpenAI action and install the pre-built templates. Authorizations Supported The Kore.ai XO Platform supports basic authentication to allow OpenAI integration to exchange data. For more information,...","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[201],"tags":[],"class_list":["post-53619","post","type-post","status-publish","format-standard","hentry","category-integrations"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/53619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=53619"}],"version-history":[{"count":13,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/53619\/revisions"}],"predecessor-version":[{"id":56902,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/53619\/revisions\/56902"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=53619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=53619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=53619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}