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: README.md
+30-35Lines changed: 30 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,6 @@
1
-
# ChatGPT + Enterprise data with Azure OpenAI and AI Search
1
+
# ChatGPT-like app with your data using Azure OpenAI and Azure AI Search (Python)
2
2
3
-
> [!IMPORTANT]
4
-
> As of November 15, 2023, Azure Cognitive Search has been renamed to Azure AI Search.
5
-
6
-
### Announcing [**JavaScript**](https://aka.ms/azai/js/code), [**.NET**](https://aka.ms/azai/net/code), and [**Java**](https://aka.ms/azai/java/code) samples based on this one ([**Python**](https://aka.ms/azai/py/code)). Learn more at https://aka.ms/azai.
3
+
This solution's backend is written in Python. There are also [**JavaScript**](https://aka.ms/azai/js/code), [**.NET**](https://aka.ms/azai/net/code), and [**Java**](https://aka.ms/azai/java/code) samples based on this one. Learn more about [developing AI apps using Azure AI Services](https://aka.ms/azai).
7
4
8
5
## Table of Contents
9
6
@@ -55,11 +52,11 @@ The repo includes sample data so it's ready to try end to end. In this sample ap
55
52
56
53
**IMPORTANT:** In order to deploy and run this example, you'll need:
57
54
58
-
***Azure account**. If you're new to Azure, [get an Azure account for free](https://azure.microsoft.com/free/cognitive-search/) and you'll get some free Azure credits to get started. See [guide to deploying with the free trial](docs/deploy_lowcost.md).
59
-
***Azure subscription with access enabled for the Azure OpenAI service**. You can request access with [this form](https://aka.ms/oaiapply). If your access request to Azure OpenAI service doesn't match the [acceptance criteria](https://learn.microsoft.com/legal/cognitive-services/openai/limited-access?context=%2Fazure%2Fcognitive-services%2Fopenai%2Fcontext%2Fcontext), you can use [OpenAI public API](https://platform.openai.com/docs/api-reference/introduction) instead. Learn [how to switch to an OpenAI instance](docs/deploy_existing.md#openaicom-openai).
60
-
***Azure account permissions**:
61
-
* Your Azure account must have `Microsoft.Authorization/roleAssignments/write` permissions, such as [Role Based Access Control Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#role-based-access-control-administrator-preview), [User Access Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#user-access-administrator), or [Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#owner). If you don't have subscription-level permissions, you must be granted [RBAC](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#role-based-access-control-administrator-preview) for an existing resource group and [deploy to that existing group](docs/deploy_existing.md#resource-group).
62
-
* Your Azure account also needs `Microsoft.Resources/deployments/write` permissions on the subscription level.
55
+
-**Azure account**. If you're new to Azure, [get an Azure account for free](https://azure.microsoft.com/free/cognitive-search/) and you'll get some free Azure credits to get started. See [guide to deploying with the free trial](docs/deploy_lowcost.md).
56
+
-**Azure subscription with access enabled for the Azure OpenAI service**. You can request access with [this form](https://aka.ms/oaiapply). If your access request to Azure OpenAI service doesn't match the [acceptance criteria](https://learn.microsoft.com/legal/cognitive-services/openai/limited-access?context=%2Fazure%2Fcognitive-services%2Fopenai%2Fcontext%2Fcontext), you can use [OpenAI public API](https://platform.openai.com/docs/api-reference/introduction) instead. Learn [how to switch to an OpenAI instance](docs/deploy_existing.md#openaicom-openai).
57
+
-**Azure account permissions**:
58
+
- Your Azure account must have `Microsoft.Authorization/roleAssignments/write` permissions, such as [Role Based Access Control Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#role-based-access-control-administrator-preview), [User Access Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#user-access-administrator), or [Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#owner). If you don't have subscription-level permissions, you must be granted [RBAC](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#role-based-access-control-administrator-preview) for an existing resource group and [deploy to that existing group](docs/deploy_existing.md#resource-group).
59
+
- Your Azure account also needs `Microsoft.Resources/deployments/write` permissions on the subscription level.
63
60
64
61
## Azure deployment
65
62
@@ -108,14 +105,14 @@ A related option is VS Code Dev Containers, which will open the project in your
*[Python 3.9, 3.10, or 3.11](https://www.python.org/downloads/)
113
-
***Important**: Python and the pip package manager must be in the path in Windows for the setup scripts to work.
114
-
***Important**: Ensure you can run `python --version` from console. On Ubuntu, you might need to run `sudo apt install python-is-python3` to link `python` to `python3`.
115
-
*[Node.js 14+](https://nodejs.org/en/download/)
116
-
*[Git](https://git-scm.com/downloads)
117
-
*[Powershell 7+ (pwsh)](https://github.com/powershell/powershell) - For Windows users only.
118
-
***Important**: Ensure you can run `pwsh.exe` from a PowerShell terminal. If this fails, you likely need to upgrade PowerShell.
-[Python 3.9, 3.10, or 3.11](https://www.python.org/downloads/)
110
+
-**Important**: Python and the pip package manager must be in the path in Windows for the setup scripts to work.
111
+
-**Important**: Ensure you can run `python --version` from console. On Ubuntu, you might need to run `sudo apt install python-is-python3` to link `python` to `python3`.
112
+
-[Node.js 14+](https://nodejs.org/en/download/)
113
+
-[Git](https://git-scm.com/downloads)
114
+
-[Powershell 7+ (pwsh)](https://github.com/powershell/powershell) - For Windows users only.
115
+
-**Important**: Ensure you can run `pwsh.exe` from a PowerShell terminal. If this fails, you likely need to upgrade PowerShell.
119
116
120
117
2. Create a new folder and switch to it in the terminal.
121
118
3. Run this command to download the project code:
@@ -146,8 +143,8 @@ Follow these steps to provision Azure resources and deploy the application code:
146
143
This will create a new folder in the `.azure` folder, and set it as the active environment for any calls to `azd` going forward.
147
144
1. (Optional) This is the point where you can customize the deployment by setting environment variables, in order to [use existing resources](docs/deploy_existing.md), [enable optional features (such as auth or vision)](docs/deploy_features.md), or [deploy to free tiers](docs/deploy_lowcost.md).
148
145
1. Run `azd up` - This will provision Azure resources and deploy this sample to those resources, including building the search index based on the files found in the `./data` folder.
149
-
***Important**: Beware that the resources created by this command will incur immediate costs, primarily from the AI Search resource. These resources may accrue costs even if you interrupt the command before it is fully executed. You can run `azd down` or delete the resources manually to avoid unnecessary spending.
150
-
* You will be prompted to selecttwo locations, one for the majority of resources and one for the OpenAI resource, which is currently a short list. That location list is based on the [OpenAI model availability table](https://learn.microsoft.com/azure/cognitive-services/openai/concepts/models#model-summary-table-and-region-availability) and may become outdated as availability changes.
146
+
-**Important**: Beware that the resources created by this command will incur immediate costs, primarily from the AI Search resource. These resources may accrue costs even if you interrupt the command before it is fully executed. You can run `azd down` or delete the resources manually to avoid unnecessary spending.
147
+
- You will be prompted to selecttwo locations, one for the majority of resources and one for the OpenAI resource, which is currently a short list. That location list is based on the [OpenAI model availability table](https://learn.microsoft.com/azure/cognitive-services/openai/concepts/models#model-summary-table-and-region-availability) and may become outdated as availability changes.
151
148
1. After the application has been successfully deployed you will see a URL printed to the console. Click that URL to interact with the application in your browser.
152
149
It will look like the following:
153
150
@@ -165,7 +162,6 @@ If you've changed the infrastructure files (`infra` folder or `azure.yaml`), the
165
162
166
163
```azd up```
167
164
168
-
169
165
## Sharing environments
170
166
171
167
To give someone else access to a completely deployed and existing environment,
@@ -190,14 +186,14 @@ See more tips in [the local development guide](docs/localdev.md).
190
186
191
187
## Using the app
192
188
193
-
* In Azure: navigate to the Azure WebApp deployed by azd. The URL is printed out when azd completes (as "Endpoint"), or you can find it in the Azure portal.
194
-
* Running locally: navigate to 127.0.0.1:50505
189
+
- In Azure: navigate to the Azure WebApp deployed by azd. The URL is printed out when azd completes (as "Endpoint"), or you can find it in the Azure portal.
190
+
- Running locally: navigate to 127.0.0.1:50505
195
191
196
192
Once in the web app:
197
193
198
-
* Try different topics in chat or Q&A context. For chat, try follow up questions, clarifications, ask to simplify or elaborate on answer, etc.
199
-
* Explore citations and sources
200
-
* Click on "settings" to try different options, tweak prompts, etc.
194
+
- Try different topics in chat or Q&A context. For chat, try follow up questions, clarifications, ask to simplify or elaborate on answer, etc.
195
+
- Explore citations and sources
196
+
- Click on "settings" to try different options, tweak prompts, etc.
201
197
202
198
## Monitoring with Application Insights
203
199
@@ -254,15 +250,14 @@ Here are the most common failure scenarios and solutions:
254
250
255
251
## Resources
256
252
257
-
* [Additional documentation for this app](docs/README.md)
258
-
* [📖 Revolutionize your Enterprise Data with ChatGPT: Next-gen Apps w/ Azure OpenAI and AI Search](https://aka.ms/entgptsearchblog)
259
-
* [📖 Azure AI Search](https://learn.microsoft.com/azure/search/search-what-is-azure-search)
* [📖 Comparing Azure OpenAI and OpenAI](https://learn.microsoft.com/azure/cognitive-services/openai/overview#comparing-azure-openai-and-openai/)
262
-
* [📖 Access Control in Generative AI applications with Azure Cognitive Search](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/access-control-in-generative-ai-applications-with-azure/ba-p/3956408)
263
-
* [📺 Quickly build and deploy OpenAI apps on Azure, infused with your own data](https://www.youtube.com/watch?v=j8i-OM5kwiY)
264
-
* [📺 AI Chat App Hack series](https://www.youtube.com/playlist?list=PL5lwDBUC0ag6_dGZst5m3G72ewfwXLcXV)
265
-
253
+
- [Additional documentation for this app](docs/README.md)
254
+
- [📖 Revolutionize your Enterprise Data with ChatGPT: Next-gen Apps w/ Azure OpenAI and AI Search](https://aka.ms/entgptsearchblog)
255
+
- [📖 Azure AI Search](https://learn.microsoft.com/azure/search/search-what-is-azure-search)
- [📖 Comparing Azure OpenAI and OpenAI](https://learn.microsoft.com/azure/cognitive-services/openai/overview#comparing-azure-openai-and-openai/)
258
+
- [📖 Access Control in Generative AI applications with Azure Cognitive Search](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/access-control-in-generative-ai-applications-with-azure/ba-p/3956408)
259
+
- [📺 Quickly build and deploy OpenAI apps on Azure, infused with your own data](https://www.youtube.com/watch?v=j8i-OM5kwiY)
260
+
- [📺 AI Chat App Hack series](https://www.youtube.com/playlist?list=PL5lwDBUC0ag6_dGZst5m3G72ewfwXLcXV)
Copy file name to clipboardExpand all lines: docs/appservice.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
@@ -20,7 +20,7 @@ We recommend always waiting 10 minutes, to give the server time to properly star
20
20
21
21
If you still see a 500 error after 10 minutes:
22
22
23
-
1.[Check the deployment logs](#checking-the-deployment-logs)
23
+
1.[Check the deployment logs](#checking-the-deployment-logs-for-errors)
24
24
2.[Look for errors in the app logs](#checking-the-app-logs-for-errors)
25
25
3.[Look for errors in Azure Monitor](#checking-azure-monitor-for-errors)
26
26
@@ -536,9 +536,9 @@ Done in 522 sec(s).
536
536
537
537
Look for these important steps in the Oryx build:
538
538
539
-
*_Detected following platforms: python: 3.11.7_
539
+
-_Detected following platforms: python: 3.11.7_
540
540
That should match your runtime in the App Service configuration.
541
-
*_Running pip install..._
541
+
-_Running pip install..._
542
542
That should install all the requirements in your requirements.txt - if it didn't find your requirements.txt, then you won't see the packages installed.
543
543
544
544
If you see all those steps in the Oryx build, then that's a good sign that the build went well, and you can move on to checking the App Service logs.
@@ -610,11 +610,11 @@ Open that file to see the full logs, with the most recent logs at the bottom.
0 commit comments