Introduction
In today's rapidly evolving technological landscape, integrating advanced AI models into business workflows is more crucial than ever. One such powerful model is DeepSeek-R1, known for its exceptional reasoning capabilities. By deploying DeepSeek on Azure and integrating it with Power Automate, businesses can automate complex tasks, enhance decision-making, and streamline operations. This blog will guide you through the process of deploying DeepSeek on Azure and using it in Power Automate, enabling you to leverage cutting-edge AI technology effortlessly.
Why Choose DeepSeek?
DeepSeek-R1 stands out due to its robust reasoning abilities, making it ideal for tasks that require logical decision-making and problem-solving. With its open-source framework, DeepSeek offers flexibility and cost-effectiveness, allowing businesses to customize the model for their specific needs. Additionally, deploying DeepSeek on Azure ensures scalability, security, and compliance, backed by Microsoft's reliable infrastructure
Lets do it!!!
Step-by-Step Guide to Deploy DeepSeek on Azure
- Login into Azure portal. Then select Azure Machine Learning service. Select +Create and then select New Workspace.
-
Enter the following details:
- Azure Subscription : All resources in an Azure subscription are billed together.
- Azure Resource Group: A resource group is a collection of resources that share the same life cycle, permissions, and policies.
- Workspace Name: Unique name that matches the constraints for naming on Azure.
- Region: Choose the region closest to you and your customers. As this workspace we are going to deploy Deepseek R1 so please select East US2.
- Storage Account: A storage account is used as the default datastore for the workspace. You may create a new Azure Storage resource or select an existing one in your subscription. Learn more: here)
- Key vault: A key vault is used to store secrets and other sensitive information that is needed by the workspace. You may create a new Azure Key Vault resource or select an existing one in your subscription.
- Application Insights: The workspace uses Azure Application Insights to store monitoring information about your deployed models. You may create a new Azure Application Insights resource or select an existing one in your subscription.
- Container Registry: A container registry is used to register docker images used in training and deployments. To minimize costs, a new Azure Container Registry resource is created only after you build your first image. Alternatively, you may choose to create the resource now or select an existing one in your subscription. Here I have selected None.
- After entering all the details please select Review+Create.
- Once the validation done successfully please select Create.
- After successfully deployed please select Go to Resource.
- Select Launch Studio to open the Azure AI Machine Learning Studio.
- Select Model Catalog, then search for Deepseek R1 model and select Deepseek R1 from the list.
- Select Deploy.
- Enter the Deployment name and then select Deploy.
- After successfully deployed the model, please copy the following details and keep it in a notepad.
- deepseek-r1: Chat Completion
- Key
Integrating DeepSeek with Power Automate
- Login into Power Automate.
- Select My Flows, then select Instant Cloud Flow from +New Flow dropdown.
- Enter the name of the flow, then select Manually trigger the flow and Create.
Select Manually trigger the flow and from the left pane under parameters Select +Add Input, then select Text.
Enter the name as Prompt.
- Add an Action, search HTTP and then select HTTP.
-
Enter the following details:
- URI : Enter the copied deepseek-r1: Chat Completion URI from Deepseek R1 deployment.
- METHOD : POST
- Headers: content-type : application/json authorization : KEY copied from Deepseek R1 deployment model.
- Body:
{
"model": "deepseek-reasoner",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": @{triggerBody()?['text']}
}
],
"stream": false
}
For content you can give the prompt from the manually trigger the flow action.
- Add a compose action and select add dynamic expression, then enter the below formula:
body('HTTP')?['choices'][0]['message/content']
- Add a Send an Email action, then enter the following details as per the below picture reference:
Save your flow.
Now your flow is ready.
You can test it out.
Flow ran successfully.
I have received an email which gives the answer i have asked in the prompt at the testing time.
Successfully completed a small example of deploying Deepseek R1 model in Azure and effectively use it in Power Automate.
Hope you enjoy the session.
Thank you for reading
Please leave a comment below if you have any further questions.
Happy Sharing !!!
Keep Learning | Spread Knowledge | Stay blessed |
Top comments (0)