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/ai-studio/tutorials/deploy-chat-web-app.md
+66-15Lines changed: 66 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.custom:
9
9
- build-2024
10
10
- ignite-2024
11
11
ms.topic: tutorial
12
-
ms.date: 11/14/2024
12
+
ms.date: 12/27/2024
13
13
ms.reviewer: tgokal
14
14
ms.author: sgilley
15
15
author: sdgilley
@@ -42,11 +42,8 @@ The steps in this tutorial are:
42
42
43
43
- A **Microsoft.Web** resource provider registered in the selected subscription, to be able to deploy to a web app. For more information on registering a resource provide, see [Register resource provider](/azure/azure-resource-manager/management/resource-providers-and-types#register-resource-provider-1).
44
44
45
-
## Add your data and try the chat model again
46
-
47
-
In the [Azure AI Foundry playground quickstart](../quickstarts/get-started-playground.md) (that's a prerequisite for this tutorial), observe how your model responds without your data. Now you add your data to the model to help it answer questions about your products.
45
+
- To complete this tutorial, you must have the necessary permissions to add role assignments in your Azure subscription. Granting permissions by role assignment is only allowed by the Owner of the specific Azure resources. You might need to ask your Azure subscription owner (who might be your IT admin) to complete the [Configure resources](#configure-resources) section for you.
48
46
49
-
[!INCLUDE [Chat with your data](../includes/chat-with-data.md)]
50
47
51
48
## Configure resources
52
49
@@ -55,11 +52,65 @@ In the [Azure AI Foundry playground quickstart](../quickstarts/get-started-playg
55
52
56
53
In order for the resources you're about to deploy to work correctly, you need to configure them with the correct permissions. This work is done in the Azure portal.
57
54
58
-
You'll configure three separate resources: the Azure AI Search service, the Azure OpenAI service, and the Azure Blob storage for your workspaceblobstore.
55
+
To start, find the resources you need to configure in the Azure AI Foundry portal.
56
+
57
+
1. Open the [Azure AI Foundry portal](https://ai.azure.com) and select the project where you deployed the Azure OpenAI model.
58
+
1. Select **Management center** from the left pane.
59
+
1. Select **Connected resources** under your project.
60
+
1. Identify the three resources you need to configure: the **Azure AI Search service**, the **Azure OpenAI service**, and the **Azure Blob storage** for your workspaceblobstore.
61
+
62
+
:::image type="content" source="../media/tutorials/deploy-chat-web-app/resources.png" alt-text="Screenshot shows the connected resources that need to be configured.":::
63
+
64
+
1. For each resource, select the link to open the resource details. From the details page, select the resource name to open the resource in the Azure portal. (For the workspaceblobstore, select **View in Azure Portal**).
65
+
1. After the tab opens, go back to the Azure AI Foundry portal and repeat the process for the next resource.
66
+
1. Keep all three new tabs open as you'll go back and forth between them to configure the resources.
67
+
68
+
### Enable managed identity
69
+
70
+
Both the **Azure AI Search service** and the **Azure OpenAI service** need managed identity enabled. For each of these two resources, follow these steps in their respective Azure portal pages:
71
+
72
+
1. From the left pane, under **Settings**, select **Identity**.
73
+
1. Switch **Status** to **On**.
74
+
1. Select **Save**.
75
+
76
+
### Set access control for search
77
+
78
+
On the tab for the **Azure AI Search service** resource in the Azure portal, set the API Access policy:
79
+
80
+
1. From the left pane, under **Settings**, select **Keys**.
81
+
1. Under **API Access control**, select **Both**.
82
+
1. When prompted, select **Yes** to confirm the change.
83
+
84
+
### Assign roles
59
85
60
-
Find each of these services:
86
+
You'll repeat this pattern multiple times in the bulleted items below.
Use these steps to assign roles for the resources you're configuring in this tutorial:
91
+
92
+
* Assign the following roles on the tab for **Azure AI Search service** in the Azure portal:
93
+
***Search Index Data Reader** to the **Azure OpenAI service** managed identity
94
+
***Search Service Contributor** to the **Azure OpenAI service** managed identity
95
+
***Contributor** to yourself (to find **Contributor**, switch to the **Privileged administrator roles** tab at the top. All other roles are in the **Job function roles** tab.)
96
+
97
+
* Assign the following roles on the tab for **Azure OpenAI service** in the Azure portal:
98
+
99
+
***Cognitive Services OpenAI Contributor** to the **Azure AI Search service** managed identity
100
+
***Contributor** to yourself.
101
+
102
+
* Assign the following roles on the tab for **Azure Blob storage** in the Azure portal:
103
+
104
+
***Storage Blob Data Contributor** to the **Azure OpenAI service** managed identity
105
+
***Storage Blob Data Reader** to the **Azure AI Search service** managed identity
106
+
***Contributor** to yourself
107
+
108
+
## Add your data and try the chat model again
109
+
110
+
In the [Azure AI Foundry playground quickstart](../quickstarts/get-started-playground.md) (that's a prerequisite for this tutorial), observe how your model responds without your data. Now add your data to the model to help it answer questions about your products.
111
+
112
+
[!INCLUDE [Chat with your data](../includes/chat-with-data.md)]
61
113
62
-
1. In the
63
114
## Deploy your web app
64
115
65
116
Once you're satisfied with the experience in Azure AI Foundry portal, you can deploy the model as a standalone web application.
@@ -102,7 +153,7 @@ To deploy the web app:
102
153
-**Resource group**: Select a resource group in which to deploy the web app. You can use the same resource group as the hub.
103
154
-**Location**: Select a location in which to deploy the web app. You can use the same location as the hub.
104
155
-**Pricing plan**: Choose a pricing plan for the web app.
105
-
-**Enable chat history in the web app**: For the tutorial, the chat history box isn't selected. If you enable the feature, your users will have access to their individual previous queries and responses. For more information, see [chat history remarks](#understand-chat-history).
156
+
-**Enable chat history in the web app**: For the tutorial, the chat history box isn't selected. If you enable the feature, your users have access to their individual previous queries and responses. For more information, see [chat history remarks](#understand-chat-history).
106
157
107
158
1. Select **Deploy**.
108
159
@@ -112,9 +163,9 @@ To deploy the web app:
112
163
113
164
### Configure web app authentication
114
165
115
-
By default, the web app will only be accessible to you. In this tutorial, you add authentication to restrict access to the app to members of your Azure tenant. Users are asked to sign in with their Microsoft Entra account to be able to access your app. You can follow a similar process to add another identity provider if you prefer. The app doesn't use the user's sign in information in any other way other than verifying they're a member of your tenant.
166
+
By default, the web app is only accessible to you. In this tutorial, you add authentication to restrict access to the app to members of your Azure tenant. Users are asked to sign in with their Microsoft Entra account to be able to access your app. You can follow a similar process to add another identity provider if you prefer. The app doesn't use the user's sign in information in any other way other than verifying they're a member of your tenant.
116
167
117
-
1. Return to the browser tab containing the Azure portal (or re-open the [Azure portal](https://portal.azure.com?azure-portal=true) in a new browser tab) and view the contents of the resource group where you deployed the hub and web app (you might need to refresh the view the see the web app).
168
+
1. Return to the browser tab containing the Azure portal (or reopen the [Azure portal](https://portal.azure.com?azure-portal=true) in a new browser tab) and view the contents of the resource group where you deployed the hub and web app (you might need to refresh the view the see the web app).
118
169
119
170
1. Select the **App Service** resource from the list of resources in the resource group.
120
171
@@ -133,7 +184,7 @@ By default, the web app will only be accessible to you. In this tutorial, you ad
133
184
134
185
### Use the web app
135
186
136
-
You're almost there! Now you can test the web app.
187
+
You're almost there. Now you can test the web app.
137
188
138
189
1. Wait 10 minutes or so for the authentication settings to take effect.
139
190
1. Return to the browser tab containing the chat playground page in Azure AI Foundry portal.
@@ -147,7 +198,7 @@ You're almost there! Now you can test the web app.
147
198
148
199
## Understand chat history
149
200
150
-
With the chat history feature, your users will have access to their individual previous queries and responses.
201
+
With the chat history feature, your users have access to their individual previous queries and responses.
151
202
152
203
You can enable chat history when you [deploy the web app](#deploy-the-web-app). Select the **Enable chat history in the web app** checkbox.
153
204
@@ -157,9 +208,9 @@ You can enable chat history when you [deploy the web app](#deploy-the-web-app).
157
208
> Enabling chat history will create a [Cosmos DB instance](/azure/cosmos-db/introduction) in your resource group, and incur [additional charges](https://azure.microsoft.com/pricing/details/cosmos-db/autoscale-provisioned/) for the storage used.
158
209
> Deleting your web app does not delete your Cosmos DB instance automatically. To delete your Cosmos DB instance, along with all stored chats, you need to navigate to the associated resource in the Azure portal and delete it.
159
210
160
-
Once you've enabled chat history, your users will be able to show and hide it in the top right corner of the app. When the history is shown, they can rename, or delete conversations. As they're logged into the app, conversations will be automatically ordered from newest to oldest, and named based on the first query in the conversation.
211
+
Once you enable chat history, your users are able to show and hide it in the top right corner of the app. When the history is shown, they can rename, or delete conversations. As they're logged into the app, conversations are automatically ordered from newest to oldest, and named based on the first query in the conversation.
161
212
162
-
If you delete the Cosmos DB resource but keep the chat history option enabled on the studio, your users will be notified of a connection error, but can continue to use the web app without access to the chat history.
213
+
If you delete the Cosmos DB resource but keep the chat history option enabled on the studio, your users are notified of a connection error, but can continue to use the web app without access to the chat history.
0 commit comments