Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Supercharge Your Business Applications with Azure OpenAI

Save for later
  • 8 min read
  • 10 Oct 2023

article-image

Dive deeper into the world of AI innovation and stay ahead of the AI curve! Subscribe to our AI_Distilled newsletter for the latest insights. Don't miss out – sign up today!

Introduction

The rapid advancement of technology, particularly in the domain of extensive language models like ChatGPT, is making waves across industries. These models leverage vast data resources and cloud computing power, gaining popularity not just among tech enthusiasts but also mainstream consumers. As a result, there's a growing demand for such experiences in daily tools, both from employees and customers who increasingly expect AI integration.

 Moreover, this technology promises transformative impacts. This article explores how organizations can harness Azure OpenAI with low-code platforms to leverage these advancements, opening doors to innovative applications and solutions.

Introduction to the Power Platform

Power Platform is a Microsoft Low Code platform that spans Microsoft 365, Azure, Dynamics 365, and standalone apps.  

a) Power Apps: Rapid low-code app development for businesses with a simple interface, scalable data platform, and cross-device compatibility.

b) Power Automate: Automates workflows between apps, from simple tasks to enterprise-grade processes, accessible to users of all technical levels.

c) Power BI: Delivers data insights through visualizations, scaling across organizations with built-in governance and security.

d) Power Virtual Agents: Creates chatbots with a no-code interface, streamlining integration with other systems through Power Automate.

e) Power Pages: Enterprise-grade, low-code SaaS for creating and hosting external-facing websites, offering customization and user-friendly design.

Introduction to Azure OpenAI

The collaboration between Microsoft's Azure cloud platform and OpenAI, known as Azure OpenAI Open, presents an exciting opportunity for developers seeking to harness the capabilities of cutting-edge AI models and services. This collaboration facilitates the creation of innovative applications across a spectrum of domains, ranging from natural language processing to AI-powered solutions, all seamlessly integrated within the Azure ecosystem.

The rapid pace of technological advancement, characterized by the proliferation of extensive language models like ChatGPT, has significantly altered the landscape of AI. These models, by tapping into vast data resources and leveraging the substantial computing power available in today's cloud infrastructure, have gained widespread popularity. Notably, this technological revolution has transcended the boundaries of tech enthusiasts and has become an integral part of mainstream consumer experiences.

As a result, organizations can anticipate a growing demand for AI-driven functionalities within their daily tools and services. Employees seek to enhance their productivity with these advanced capabilities, while customers increasingly expect seamless integration of AI to improve the quality and efficiency of the services they receive.

Beyond meeting these rising expectations, the collaboration between Azure and OpenAI offers the potential for transformative impacts. This partnership enables developers to create applications that can deliver tangible and meaningful outcomes, revolutionizing the way businesses operate and interact with their audiences.

 Azure OpenAI Prerequisites 

These prerequisites enable you to leverage Azure OpenAI's capabilities for your projects.

1. Azure Account: Sign up for an Azure account free or paid: https://azure.microsoft.com/

2. Azure Subscription: Acquire an active Azure subscription. 

3. Azure OpenAI  Request Form: Follow this form 
https://customervoice.microsoft.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR7en2Ais5pxKtso_Pz4b1_xUOFA5Qk1UWDRBMjg0WFhPMkIzTzhKQ1dWNyQlQCN0PWcu

4. API Endpoint: Know your API endpoint for integration. 

5. Azure SDKs: Familiarize with Azure SDKs for seamless development: https://docs.microsoft.com/azure/developer/python/azure-sdk-overview  

Step to Supercharge your business applications with Azure OpenAI

Step 1: Azure OpenAI Instance and keys 

1.      Create a new Azure OpenAI Instance. Select region that is available for Azure OpenAI and name the instance accordingly. 

supercharge-your-business-applications-with-azure-openai-img-0

2.      Once Azure OpenAI instanced is provisioned, select he Explore button

supercharge-your-business-applications-with-azure-openai-img-1 

3.      Under Management, select Deployment and select Create new deployment 

supercharge-your-business-applications-with-azure-openai-img-2
 

4.      Select gpt-35-turbo and give a deployment name a meaningful name. 

supercharge-your-business-applications-with-azure-openai-img-3 

5.     Under playground select deployment and select View code.  

supercharge-your-business-applications-with-azure-openai-img-4

 

6.      In this sample code, copy the endpoint and key in a notepad file that you will use in the next steps. 

supercharge-your-business-applications-with-azure-openai-img-5

Step 2: Create a Power Apps Canvas app

1.      Create a Power Apps Canvas App with Tablet format.

2.      Add textboxes for questions, a button that will trigger Power Automate, and gallery for output from Power Automate via Azure OpenAI service: 

supercharge-your-business-applications-with-azure-openai-img-6

3.      Connect Flow by Selecting the Power Automate icon, selecting Add flow and selecting Create new flow  

supercharge-your-business-applications-with-azure-openai-img-7 

4.      Select a blank flow 

supercharge-your-business-applications-with-azure-openai-img-8

Step 3: Power Automate

1.      In Power Automate, name the flow, next step search for HTTP action. Take note HTTP action is a Premium connector. 

supercharge-your-business-applications-with-azure-openai-img-9 
 

2.      Next, configure the HTTP action with this step.

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at €18.99/month. Cancel anytime

a.      Method: POST

b.      URL: You copied this at Step 1.6

c.      Endpoint:  You copied this at Step 1.6

d.      Body: Follow the Microsoft Azure OpenAI documentation https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/chatgpt?pivots=programming-language-chat-completions

e.      Select Add dynamic content, double click on Ask in PowerApps and new parameter HTTP_Body has been created

f.       Use Power Apps Parameter. 

supercharge-your-business-applications-with-azure-openai-img-10

3.      In the Next Step, search for Compose, use Body as a parameter, and save the flow. 

supercharge-your-business-applications-with-azure-openai-img-11

4.      Run the flow 

supercharge-your-business-applications-with-azure-openai-img-12
 

5.      Copy the outputs of the Compose action to Notepad. You will use it in the next steps later. 

supercharge-your-business-applications-with-azure-openai-img-13 

6.      In the Next Step, search for Parse JSON, in Add dynamic content locate Body, and drag to Content

supercharge-your-business-applications-with-azure-openai-img-14 
 

7.      Select Generate from sample 

supercharge-your-business-applications-with-azure-openai-img-15
 

8.      Paste the content that you did in previous Step 3.5. 

supercharge-your-business-applications-with-azure-openai-img-16
 

9.      In the next step, search for Response action, in Add dynamic content select Choices 

supercharge-your-business-applications-with-azure-openai-img-17
 

5.      Save the flow. 

supercharge-your-business-applications-with-azure-openai-img-18
 

Step 4: Write up the Canvas app with Power Automate

1.      Set variables at button control 

supercharge-your-business-applications-with-azure-openai-img-19
 

2.      Use Gallery Control to display output from Power Automate via Azure OpenAI. 

supercharge-your-business-applications-with-azure-openai-img-20

Step 5: Test the App

1.      Ask a question in the Power Apps user interface as shown below

supercharge-your-business-applications-with-azure-openai-img-21
 

2.      After a few seconds, we get a response that comes from Azure OpenAI. 

supercharge-your-business-applications-with-azure-openai-img-22

Conclusion

You've successfully configured a comprehensive integration involving three key services to enhance your application's capabilities:

1. Power Apps: This service serves as the user-facing visual interface, providing an intuitive and user-friendly experience for end-users. With Power Apps, you can design and create interactive applications tailored to your specific needs, empowering users to interact with your system effortlessly.

2. Power Automate: For establishing seamless connectivity between your application and Azure OpenAI, Power Automate comes into play. It acts as the bridge that enables data and process flow between different services. With Power Automate, you can automate workflows, manage data, and trigger actions, ensuring a smooth interaction between your application and Azure OpenAI's services.

3. Azure OpenAI: Leveraging the capabilities of Azure OpenAI, particularly the ChatGPT 3.5 Turbo service, opens up a world of advanced natural language processing and AI capabilities. This service enables your application to understand and respond to user inputs, making it more intelligent and interactive. Whether it's for chatbots, text generation, or language understanding, Azure OpenAI's powerful tools can significantly enhance your application's functionality.

By integrating these three services seamlessly, you've created a robust ecosystem for your application. Users can interact with a visually appealing and user-friendly interface powered by Power Apps, while Power Automate ensures that data and processes flow smoothly behind the scenes. Azure OpenAI, with its advanced language capabilities, adds a layer of intelligence to your application, making it more responsive and capable of understanding and generating human-like text.

This integration not only improves user experiences but also opens up possibilities for more advanced and dynamic applications that can understand, process, and respond to natural language inputs effectively.

Source Code

You can rebuild the entire solution at my GitHub Repo at  https://github.com/aarohbits/AzureOpenAIWithPowerPlatform/blob/main/01%20AzureOpenAIPowerPlatform/Readme.md 

Author Bio

Aroh Shukla is a Microsoft Most Valuable Professional (MVP) Alumni and a Microsoft Certified Trainer (MCT) with expertise in Power Platform and Azure. He assists customers from various industries in their digital transformation endeavors, crafting tailored solutions using advanced Microsoft technologies. He is not only dedicated to serving students and professionals on their Microsoft technology journeys but also excels as a community leader with strong interpersonal skills, active listening, and a genuine commitment to community progress.

He possesses a deep understanding of the Microsoft cloud platform and remains up-to-date with the latest innovations. His exceptional communication abilities enable him to effectively convey complex technical concepts with clarity and conciseness, making him a valuable resource in the tech community.