Using the Azure OpenAI Action Templates¶
You can use the Prebuilt Action Templates from your Azure OpenAI integration to auto-create dialog tasks and test them using the Talk to Bot option.
Steps to create a dialog task using the Azure OpenAI action templates:
-
Ensure that you have configured Azure OpenAI and installed templates successfully. If you have configured it and skipped installing the templates, see Marketplace to install the templates.
-
Go to Automation AI > Virtual Assistant > Use Cases > Dialogs. All the dialogs are displayed.
-
Click the auto-created dialog. The the canvas opens with all required entity nodes, service nodes, and message scripts.
Azure OpenAI Actions¶
The following Azure OpenAI action is supported:
Supported Tasks | Description | Method |
General Query | Resolve any query using the intelligence of Azure and OpenAI. | POST |
General Query¶
Steps to resolve the query in the Azure OpenAI integration:
-
Refer to the Installing the Azure OpenAI Action Templates section to install this template.
-
The General Query dialog task is added with the following components:
- generalQuery: A user intent for a general query.
- userQuestion and deploymentID – Entity nodes pass a user’s question.
- generalQueryService – A bot action service to send a query in an external integration. Click the Plus icon to expand to view the generalQueryService bot action component properties.
-
In the Component Properties window, click the Edit Request link to edit the request parameters, as shown below:
Sample Request
{ "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 }
To add one or more response, scroll down and click the +Add Response button:
Sample Response
{ "id": "cmpl-6s8YPFcRGYrDtPys2OdVfxxxxxx", "object": "text_completion", "created": 1678360613, "model": "text-davinci-003", "choices": [ { "text": "\n\n1. Focus on creating a great user experience: Make sure your product is easy to use, intuitive, and provides value to your customers.\n\n2. Offer free trials: Give potential customers the opportunity to try out your product before committing to a purchase.\n\n3. Leverage word-of-mouth marketing: Ask existing customers to share their experiences with their friends and family.\n\n4. Invest in content marketing: Create helpful content related to your product and share it on social media and other platforms.\n\n5. Utilize search engine optimization (SEO): Optimize your website and content for search engines to increase visibility and attract more customers.\n\n6. Run targeted ads: Use paid advertising to reach potential customers who are likely to be interested in your product.\n\n7. Participate in industry events: Attend conferences, trade shows, and other events to network and build relationships with potential customers.\n\n8. Offer discounts and promotions: Provide discounts and other promotions to encourage customers to purchase your product.", "index": 0, "logprobs": null, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 19, "completion_tokens": 212, "total_tokens": 231 } }
-
generalQueryMessage – A message node with the script to display the query in Azure OpenAI system.
-
Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to resolve a general query.
-
Enter a question based on a query when prompted by the VA, as shown below: