> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the OpenAI Action Templates

[Back to Actions Integrations](https://koreai.mintlify.site/ai-for-service/integrations/overview.md#actions)

Use prebuilt OpenAI action templates to auto-create dialog tasks for generating answers and extracting skills.

**To access templates:**

1. Go to **Automation AI** > **Use Cases** > **Dialogs** and click **Create a Dialog Task**.

2. Under **Integration**, select **OpenAI**.

   ![Integration -- OpenAI](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img2.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=14257a2485938db41382835aff99a147)

3. If no integration is configured, click **Explore Integrations** to set one up. See [Actions Overview](https://koreai.mintlify.site/ai-for-service/integrations/overview.md#actions).

   ![Explore Integrations](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img3.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=a0491100f6fc7603b452bf84ad727c7e)

***

## Supported Actions

| Task | Description | Method |
| - | - | - |
| Generate Answers from Context | Generates answers for questions based on the given context. | POST |
| Extract Skills from Resume | Extracts skills from resume content provided as input. | POST |

***

### Generate Answers from Context

1. Install the template from [OpenAI Action Templates](https://koreai.mintlify.site/ai-for-service/integrations/actions/configuring-the-openai-action#step-2-install-the-openai-action-templates).

2. The **Generate answers from context** dialog task is added with the following components:

   ![Generate answers from context dialog task is added](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img4.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=233e694a89aeca05b482f86f119e3fb5)

   * **answerGeneration** - User intent to generate answers.

   * **paragraph** and **question** - Entity nodes for the required details.

   * **answerGenerationService** - Bot action service to generate answers. Click **Edit Request**:

     ![Edit request](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img5.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=85ab036b3263bcc7089e81c7ec8eb83d)

     **Sample Request:**

     ```json theme={null}
     {
       "model": "text-davinci-003",
       "prompt": "Context: <your context text> Q: <your question>",
       "temperature": 0,
       "max_tokens": 256,
       "top_p": 1,
       "frequency_penalty": 0,
       "presence_penalty": 0
     }
     ```

     > [!NOTE]
     >
     > You can enter a maximum of 1500 words with no line breaks, single or double quotes in the content.

     Click **+Add Response**:

     ![Add response](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img6.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=86539391d9909539f100319a01df23f7)

     **Sample Response:**

     ```json theme={null}
     {
       "id": "cmpl-6f2Q0ZeQIOoSpX428wUr3rp7T7zgc",
       "object": "text_completion",
       "created": 1675238764,
       "model": "text-davinci-003",
       "choices": [
         {
           "text": "\n\nA: Under this policy, you can avail a maximum relocation reimbursement of up to $20,000, inclusive of tax gross-up.",
           "index": 0,
           "logprobs": null,
           "finish_reason": "stop"
         }
       ],
       "usage": {
         "prompt_tokens": 396,
         "completion_tokens": 30,
         "total_tokens": 426
       }
     }
     ```

   * **answerGenerationMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   ![VA prompt to generate answer from context](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img7.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=67fd4b934c14dd127bbcce8761c902d2)

4. Enter a question based on context when prompted:

   ![Enter question](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img8.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=e1feef0466cf11355ac8fc0a20699960)

***

### Extract Skills from Resume

1. Install the template from [OpenAI Action Templates](https://koreai.mintlify.site/ai-for-service/integrations/actions/configuring-the-openai-action#step-2-install-the-openai-action-templates).

2. The **Extract Skills from resume** dialog task is added with the following components:

   ![Extract Skills from resume dialog task is added](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img9.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=deddc2872e32e0ec7f89808ae8a7be59)

   * **extractSkills** - User intent to extract skills from resume content.

   * **resume** - Entity node for extracting skills.

   * **extractSkillsService** - Bot action service to extract skills. Click **Edit Request**:

     ![Edit request](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img10.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=ff0b83908dc13913e367fee6f013d7d0)

     **Sample Request:**

     ```json theme={null}
     {
       "model": "text-davinci-002",
       "prompt": "<resume content>",
       "temperature": 0.7,
       "stop": "Q:"
     }
     ```

     > [!NOTE]
     >
     > You can enter a maximum of 1500 words with no line breaks, single or double quotes in the content.

     Click **+Add Response**:

     ![Add response](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img11.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=f7ad9857f3f5232303ae28f2f3be332a)

     **Sample Response:**

     ```json theme={null}
     {
       "id": "cmpl-6U8OZ4pJmLgGliKfCgfBjzgUgEV5Q",
       "object": "text_completion",
       "created": 1672640131,
       "model": "text-davinci-002",
       "choices": [
         {
           "text": "\n\n-Advanced automated aerated system-Wi-Fi technology-ESP8266 Wi-Fi module",
           "index": 0,
           "logprobs": null,
           "finish_reason": "stop"
         }
       ],
       "usage": {
         "prompt_tokens": 163,
         "completion_tokens": 27,
         "total_tokens": 190
       }
     }
     ```

   * **extractSkillsMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test.

4. Enter resume content when prompted:

   ![Enter resume content](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img12.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=fa67fd214c24d0b16e19b1a03f35f41e)

5. The VA extracts skills from the resume content:

   ![Extracted Skills from resume content](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-tem-img13.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=c686c3e17916c9231a5d686783bb4b01)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.