You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/includes/deploy-intelligent-apps/deploy-intelligent-apps-linux-dotnet-pivot.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.date: 04/10/2024
8
8
ms.author: jefmarti
9
9
---
10
10
11
-
You can use Azure App Service to work with popular AI frameworks like LangChain and Semantic Kernel connected to OpenAI for creating intelligent apps. In the following tutorial, we are adding an Azure OpenAI service using Semantic Kernel to a .NET 8 Blazor web application.
11
+
You can use Azure App Service to work with popular AI frameworks like LangChain and Semantic Kernel connected to OpenAI for creating intelligent apps. In the following tutorial, we're adding an Azure OpenAI service using Semantic Kernel to a .NET 8 Blazor web application.
12
12
13
13
#### Prerequisites
14
14
@@ -17,7 +17,7 @@ You can use Azure App Service to work with popular AI frameworks like LangChain
17
17
18
18
### Setup Blazor web app
19
19
20
-
For this Blazor web application, we are building off the Blazor [template](https://dotnet.microsoft.com/learn/aspnet/blazor-tutorial/intro) and creating a new razor page that can send and receive requests to an Azure OpenAI OR OpenAI service using Semantic Kernel.
20
+
For this Blazor web application, we're building off the Blazor [template](https://dotnet.microsoft.com/learn/aspnet/blazor-tutorial/intro) and creating a new razor page that can send and receive requests to an Azure OpenAI OR OpenAI service using Semantic Kernel.
21
21
22
22
1. Right click on the **Pages** folder found under the **Components** folder and add a new item named *OpenAI.razor*
23
23
2. Add the following code to the **OpenAI.razor* file and click **Save**
@@ -64,7 +64,7 @@ After the Navigation is updated, we can start preparing to build the OpenAI clie
64
64
65
65
In order to make calls to OpenAI with your client, you need to first grab the Keys and Endpoint values from Azure OpenAI, or OpenAI and add them as secrets for use in your application. Retrieve and save the values for later use.
66
66
67
-
For Azure OpenAI, see [this documentation](../../../ai-services/openai/quickstart.md?pivots=programming-language-csharp&tabs=command-line%2Cpython#retrieve-key-and-endpoint) to retrieve the key and endpoint values. If you are planning to use [managed identity](../../overview-managed-identity.md) to secure your app you will only need the `deploymentName` and `endpoint` values. Otherwise, you will need each of the following:
67
+
For Azure OpenAI, see [this documentation](../../../ai-services/openai/quickstart.md?pivots=programming-language-csharp&tabs=command-line%2Cpython#retrieve-key-and-endpoint) to retrieve the key and endpoint values. If you're planning to use [managed identity](../../overview-managed-identity.md) to secure your app you'll only need the `deploymentName` and `endpoint` values. Otherwise, you need each of the following:
68
68
69
69
- `deploymentName`
70
70
- `endpoint`
@@ -190,7 +190,7 @@ var kernel = builder.Build();
190
190
191
191
### Secure your app with managed identity
192
192
193
-
If you’re using Azure OpenAI, it's highly recommended to secure your application using [managed identity](../../overview-managed-identity.md) to authenticate your app to your Azure OpenAI resource. This enables your application to access the Azure OpenAI resource without needing to manage API keys. If you are not using Azure OpenAI, your secrets can remain secure using Azure Key Vault outlined above.
193
+
If you’re using Azure OpenAI, it's highly recommended to secure your application using [managed identity](../../overview-managed-identity.md) to authenticate your app to your Azure OpenAI resource. This enables your application to access the Azure OpenAI resource without needing to manage API keys. If you're not using Azure OpenAI, your secrets can remain secure using Azure Key Vault outlined above.
194
194
195
195
Follow the steps below to secure your application with managed identity:
196
196
@@ -200,7 +200,7 @@ Add the identity package `Azure.Identity`. This package enables using Azure cred
200
200
@usingAzure.Identity
201
201
```
202
202
203
-
Next, include the default Azure credentials in the chat completions parameters. Note that the`deploymentName` and `endpoint` parameters are still required and should be secured using the Key Vault method covered in the previous section.
203
+
Next, include the default Azure credentials in the chat completions parameters. The`deploymentName` and `endpoint` parameters are still required and should be secured using the Key Vault method covered in the previous section.
204
204
205
205
```c#
206
206
varkernel=Kernel.CreateBuilder()
@@ -215,7 +215,7 @@ var kernel = Kernel.CreateBuilder()
215
215
Once the credentials are added to the application, you'll then need to enable managed identity in your application and grant access to the resource.
216
216
217
217
1. In your web app resource, navigate to the **Identity** blade and turn on **System assigned** and click **Save**
218
-
2. Once System assigned identity is turned on, it will register the web app with Microsoft Entra ID and the web app can be granted permissions to access protected resources.
218
+
2. Once System assigned identity is turned on, it register's the web app with Microsoft Entra ID and the web app can be granted permissions to access protected resources.
219
219
3. Go to your Azure OpenAI resource and navigate to the **Access control (IAM)** blade on the left pane.
220
220
4. Find the Grant access to this resource card and click on **Add role assignment**
221
221
5. Search for the **Cognitive Services OpenAI User** role and click **Next**
0 commit comments