Skip to content

Commit 6beaacb

Browse files
Update deploy-intelligent-apps-linux-node-pivot.md
1 parent 830d979 commit 6beaacb

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

articles/app-service/includes/deploy-intelligent-apps/deploy-intelligent-apps-linux-node-pivot.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ You can use Azure App Service to create applications using Azure OpenAI and Open
1212

1313
#### Prerequisites
1414

15-
- An [Azure OpenAI resource](/azure/ai-services/openai/quickstart?pivots=programming-language-csharp&tabs=command-line%2Cpython#set-up) or an [OpenAI account](https://platform.openai.com/overview).
15+
- An [Azure OpenAI resource](/azure/ai-services/openai/quickstart?pivots=programming-language-csharp&tabs=command-line%2Cpython#set-up) or an [OpenAI account](https://platform.openai.com/overview).
1616
- A Node.js Express application. Create the sample app using our [quickstart](/azure/app-service/quickstart-nodejs?tabs=linux&pivots=development-environment-vscode).
1717

1818
### Set up web app
1919

20-
For this application, were building off the [quickstart](/azure/app-service/quickstart-nodejs?tabs=linux&pivots=development-environment-vscode) Express app and adding an extra feature to make a request to an Azure OpenAI or OpenAI service.
20+
For this application, we're building off the [quickstart](/azure/app-service/quickstart-nodejs?tabs=linux&pivots=development-environment-vscode) Express app and adding an extra feature to make a request to an Azure OpenAI or OpenAI service.
2121

2222
First, copy and replace the `index.ejs` file with the following code:
2323

@@ -48,7 +48,7 @@ The previous code will add an input box to our index page to submit requests to
4848

4949
First, you need to 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 to build the client.
5050

51-
For Azure OpenAI, see [this documentation](/azure/ai-services/openai/quickstart?pivots=programming-language-csharp&tabs=command-line%2Cpython#retrieve-key-and-endpoint) to retrieve the key and endpoint values. If youre planning to use managed identity to secure your app youll only need the `deploymentName` and `apiVersion` values.
51+
For Azure OpenAI, see [this documentation](/azure/ai-services/openai/quickstart?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 to secure your app you'll only need the `deploymentName` and `apiVersion` values.
5252

5353
Otherwise, you need each of the following:
5454

@@ -63,9 +63,9 @@ For OpenAI, see this documentation to retrieve the API keys. For our application
6363

6464
- `apiKey`
6565

66-
Since we're deploying to App Service, we can secure these secrets in **Azure Key Vault** for protection. Follow the [Quickstart](/azure/key-vault/secrets/quick-create-cli#create-a-key-vault) to set up your Key Vault and add the secrets you saved from earlier.
66+
Since we're deploying to App Service, we can secure these secrets in **Azure Key Vault** for protection. Follow the [Quickstart](/azure/key-vault/secrets/quick-create-cli#create-a-key-vault) to set up your Key Vault and add the secrets you saved from earlier.
6767

68-
Next, we can use Key Vault references as app settings in our App Service resource to reference in our application. Follow the instructions in the [documentation](../../app-service-key-vault-references.md?source=recommendations&tabs=azure-cli) to grant your app access to your Key Vault and to set up Key Vault references.
68+
Next, we can use Key Vault references as app settings in our App Service resource to reference in our application. Follow the instructions in the [documentation](../../app-service-key-vault-references.md?source=recommendations&tabs=azure-cli) to grant your app access to your Key Vault and to set up Key Vault references.
6969

7070
Then, go to the portal Environment Variables page in your resource and add the following app settings:
7171

@@ -149,7 +149,7 @@ import OpenAI from 'openai';
149149

150150
### Secure your app with managed identity
151151

152-
Although optional, it's highly recommended to secure your application using [managed identity](../../overview-managed-identity.md) to authenticate your app to your Azure OpenAI resource. Skip this step if you are not using Azure OpenAI. This enables your application to access the Azure OpenAI resource without needing to manage API keys.
152+
Although optional, it's highly recommended to secure your application using [managed identity](../../overview-managed-identity.md) to authenticate your app to your Azure OpenAI resource. Skip this step if you are not using Azure OpenAI. This enables your application to access the Azure OpenAI resource without needing to manage API keys.
153153

154154
Follow the steps below to secure your application:
155155

@@ -177,14 +177,14 @@ Create the Azure OpenAI client with the token provider.
177177

178178
Once the credentials are added to the application, enable managed identity in your application and grant access to the resource:
179179

180-
1. In your web app resource, navigate to the **Identity** blade and turn on **System assigned** and select **Save**.
180+
1. In your web app resource, navigate to the **Identity** blade and turn on **System assigned** and select **Save**.
181181
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.
182-
3. Go to your Azure OpenAI resource and navigate to the **Access control (IAM)** page on the left pane.
183-
4. Find the **Grant access to this resource** card and select **Add role assignment**.
184-
5. Search for the **Cognitive Services OpenAI User** role and select **Next**.
185-
6. On the **Members** tab, find **Assign access to** and choose the **Managed identity** option.
186-
7. Next, select **+Select Members** and find your web app.
187-
8. Select **Review + assign**.
182+
3. Go to your Azure OpenAI resource and navigate to the **Access control (IAM)** page on the left pane.
183+
4. Find the **Grant access to this resource** card and select **Add role assignment**.
184+
5. Search for the **Cognitive Services OpenAI User** role and select **Next**.
185+
6. On the **Members** tab, find **Assign access to** and choose the **Managed identity** option.
186+
7. Next, select **+Select Members** and find your web app.
187+
8. Select **Review + assign**.
188188

189189
Your web app is now added as a cognitive service OpenAI user and can communicate to your Azure OpenAI resource.
190190

@@ -236,7 +236,7 @@ app.post("/api/completions", async (req, res) => {
236236
237237
This post function will create the OpenAI client and add the message being sent to OpenAI with a returned response.
238238
239-
Heres the example in its complete form. In this example, use the Azure OpenAI chat completion service OR the OpenAI chat completion service, not both.
239+
Here's the example in it's complete form. In this example, use the Azure OpenAI chat completion service OR the OpenAI chat completion service, not both.
240240
241241
```jsx
242242
var createError = require('http-errors');
@@ -339,6 +339,6 @@ Once the app is deployed, you can visit your site URL and see the text that cont
339339
340340
### Authentication
341341
342-
Although optional, it's highly recommended that you also add authentication to your web app when using an Azure OpenAI or OpenAI service. This can add a level of security with no other code. Learn how to enable authentication for your web app [here](../../scenario-secure-app-authentication-app-service.md).
342+
Although optional, it's highly recommended that you also add authentication to your web app when using an Azure OpenAI or OpenAI service. This can add a level of security with no other code. Learn how to enable authentication for your web app [here](../../scenario-secure-app-authentication-app-service.md).
343343
344-
Once deployed, browse to the web app and navigate to the OpenAI tab. Enter a query to the service and you should see a populated response from the server. The tutorial is now complete and you now know how to use OpenAI services to create intelligent applications.
344+
Once deployed, browse to the web app and navigate to the OpenAI tab. Enter a query to the service and you should see a populated response from the server. The tutorial is now complete and you now know how to use OpenAI services to create intelligent applications.

0 commit comments

Comments
 (0)