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

# Using the Azure OpenAI Action Templates

<Badge icon="arrow-left" color="gray">[Back to Actions Integrations](/ai-for-service/integrations/overview#actions)</Badge>

Use prebuilt Azure OpenAI action templates to auto-create dialog tasks.

**Prerequisites:** Configure [Azure OpenAI](/ai-for-service/integrations/actions/configuring-the-azure-openai-action) and [install templates](/ai-for-service/integrations/actions/configuring-the-azure-openai-action#step-3-install-azure-openai-action-templates) before proceeding.

Navigate to **Automation AI > Use Cases > Dialogs**, then click the auto-created dialog to open the canvas.

***

## Supported Actions

| Action        | Description                          | Method |
| ------------- | ------------------------------------ | ------ |
| General Query | Resolve any query using Azure OpenAI | POST   |

***

## General Query

1. Install the template from [Azure OpenAI Templates](/ai-for-service/integrations/actions/configuring-the-azure-openai-action#step-3-install-azure-openai-action-templates).

2. The **General Query** dialog task is added with:

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img21-azure-action10.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=32019ed9c1185c734bfd45a39f1f7ba5" alt="Dialog added" width="1719" height="889" data-path="ai-for-service/integrations/actions/images/configure-azure-img21-azure-action10.png" />

   * **generalQuery** - User intent for a general query.

   * **userQuestion** and **deploymentID** - Entity nodes to pass the user's question.

   * **generalQueryService** - Bot action service to send the query. Click **Edit Request** to modify parameters:

     <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/azure-temp-img5-azure-action11.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=e25a5850fb0156a7fa686c8fb4c6b365" alt="Edit request" width="1916" height="861" data-path="ai-for-service/integrations/actions/images/azure-temp-img5-azure-action11.png" />

     **Sample Request:**

     ```json theme={null}
     {
       "prompt": "I am the owner of a SAAS product company. How can i increase my customer base?",
       "temperature": 0.25,
       "max_tokens": 1024,
       "top_p": 1,
       "frequency_penalty": 0,
       "presence_penalty": 0
     }
     ```

     Click **+Add Response** to add sample responses:

     **Sample Response:**

     ```json theme={null}
     {
       "id": "cmpl-6s8YPFcRGYrDtPys2OdVfxxxxxx",
       "object": "text_completion",
       "created": 1678360613,
       "model": "text-davinci-003",
       "choices": [
         {
           "text": "\n\n1. Focus on creating a great user experience...",
           "index": 0,
           "logprobs": null,
           "finish_reason": "stop"
         }
       ],
       "usage": {
         "prompt_tokens": 19,
         "completion_tokens": 212,
         "total_tokens": 231
       }
     }
     ```

   * **generalQueryMessage** - Message node to display the query response.

3. Click **Train** to complete training.

4. Click **Talk to Bot** to test.

5. Enter a question when prompted.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/azure-temp-img6-azure-action12.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=f52466dd43ad9be97194dcafb6684613" alt="Enter a question" width="484" height="805" data-path="ai-for-service/integrations/actions/images/azure-temp-img6-azure-action12.png" />

6. An answer is generated for your query.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/azure-temp-img7-azure-action13.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=d0563acc6affc1f0dcbf82b4ea8bbac3" alt="Answer" width="497" height="802" data-path="ai-for-service/integrations/actions/images/azure-temp-img7-azure-action13.png" />
