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
-[Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
15
+
-[Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
21
16
-[Setting up the development environment](#setting-up-the-development-environment)
22
17
-[Running unit tests](#running-unit-tests)
23
18
-[Running E2E tests](#running-e2e-tests)
24
-
-[Code Style](#code-style)
25
-
-[Adding new azd environment variables](#add-new-azd-environment-variables)
19
+
-[Code style](#code-style)
20
+
-[Adding new azd environment variables](#adding-new-azd-environment-variables)
21
+
-[Adding new UI strings](#adding-new-ui-strings)
26
22
27
-
## Code of Conduct
28
-
29
-
Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
30
-
31
-
## Found an Issue?
32
-
33
-
If you find a bug in the source code or a mistake in the documentation, you can help us by
34
-
[submitting an issue](#submitting-an-issue) to the GitHub Repository. Even better, you can
35
-
[submit a Pull Request](#submitting-a-pull-request-pr) with a fix.
36
-
37
-
## Want a Feature?
38
-
39
-
You can *request* a new feature by [submitting an issue](#submitting-an-issue) to the GitHub
40
-
Repository. If you would like to *implement* a new feature, please submit an issue with
41
-
a proposal for your work first, to be sure that we can use it.
42
-
43
-
-**Small Features** can be crafted and directly [submitted as a Pull Request](#submitting-a-pull-request-pr).
44
-
45
-
## Submission Guidelines
46
-
47
-
### Submitting an Issue
48
-
49
-
Before you submit an issue, search the archive, maybe your question was already answered.
50
-
51
-
If your issue appears to be a bug, and hasn't been reported, open a new issue.
52
-
Help us to maximize the effort we can spend fixing issues and adding new
53
-
features, by not reporting duplicate issues. Providing the following information will increase the
54
-
chances of your issue being dealt with quickly:
55
-
56
-
-**Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
57
-
-**Version** - what version is affected (e.g. 0.1.2)
58
-
-**Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
59
-
-**Browsers and Operating System** - is this a problem with all browsers?
60
-
-**Reproduce the Error** - provide a live example or a unambiguous set of steps
61
-
-**Related Issues** - has a similar issue been reported before?
62
-
-**Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
63
-
causing the problem (line of code or commit)
64
-
65
-
You can file new issues by providing the above information at the corresponding repository's issues link: <https://github.com/[organization-name>]/[repository-name]/issues/new].
66
-
67
-
### Submitting a Pull Request (PR)
23
+
## Submitting a Pull Request (PR)
68
24
69
25
Before you submit your Pull Request (PR) consider the following guidelines:
Copy file name to clipboardExpand all lines: README.md
+47-72Lines changed: 47 additions & 72 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,10 @@ This solution's backend is written in Python. There are also [**JavaScript**](ht
26
26
[](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=599293758&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=WestUs2)
27
27
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/azure-samples/azure-search-openai-demo)
28
28
29
+
## Important Security Notice
30
+
31
+
This template, the application code and configuration it contains, has been built to showcase Microsoft Azure specific services and tools. We strongly advise our customers not to make this code part of their production environments without implementing or enabling additional security features. See our [productionizing guide](docs/productionizing.md) for tips, and consult the [Azure OpenAI Landing Zone reference architecture](https://techcommunity.microsoft.com/blog/azurearchitectureblog/azure-openai-landing-zone-reference-architecture/3882102) for more best practices.
32
+
29
33
## Table of Contents
30
34
31
35
-[Features](#features)
@@ -37,15 +41,10 @@ This solution's backend is written in Python. There are also [**JavaScript**](ht
37
41
-[Local environment](#local-environment)
38
42
-[Deploying](#deploying)
39
43
-[Deploying again](#deploying-again)
40
-
-[Sharing environments](#sharing-environments)
41
-
-[Running locally](#running-locally)
44
+
-[Running the development server](#running-the-development-server)
42
45
-[Using the app](#using-the-app)
43
46
-[Clean up](#clean-up)
44
47
-[Guidance](#guidance)
45
-
-[Customizing the UI and data](#customizing-the-ui-and-data)
46
-
-[Monitoring with Application Insights](#monitoring-with-application-insights)
47
-
-[Productionizing](#productionizing)
48
-
-[Troubleshooting](#troubleshooting)
49
48
-[Resources](#resources)
50
49
51
50

@@ -196,26 +195,28 @@ If you've changed the infrastructure files (`infra` folder or `azure.yaml`), the
196
195
azd up
197
196
```
198
197
199
-
#### Sharing environments
198
+
## Running the development server
199
+
200
+
You can only run a development server locally **after** having successfully run the `azd up` command. If you haven't yet, follow the [deploying](#deploying) steps above.
201
+
202
+
1. Run `azd auth login` if you have not logged in recently.
203
+
2. Start the server:
200
204
201
-
To give someone else access to a completely deployed and existing environment,
202
-
either you or they can follow these steps:
205
+
Windows:
203
206
204
-
1. Install the [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli)
205
-
1. Run `azd init -t azure-search-openai-demo` or clone this repository.
206
-
1. Run `azd env refresh -e {environment name}`
207
-
They will need the azd environment name, subscription ID, and location to run this command. You can find those values in your `.azure/{env name}/.env` file. This will populate their azd environment's `.env` file with all the settings needed to run the app locally.
208
-
1. Set the environment variable `AZURE_PRINCIPAL_ID` either in that `.env` file or in the active shell to their Azure ID, which they can get with `az ad signed-in-user show`.
209
-
1. Run `./scripts/roles.ps1` or `.scripts/roles.sh` to assign all of the necessary roles to the user. If they do not have the necessary permission to create roles in the subscription, then you may need to run this script for them. Once the script runs, they should be able to run the app locally.
207
+
```shell
208
+
./app/start.ps1
209
+
```
210
210
211
-
## Running locally
211
+
Linux/Mac:
212
212
213
-
You can only run locally **after** having successfully run the `azd up` command. If you haven't yet, follow the [deploying](#deploying) steps above.
213
+
```shell
214
+
./app/start.sh
215
+
```
214
216
215
-
1. Run `azd auth login`
216
-
2. Change dir to `app`
217
-
3. Run `./start.ps1` or `./start.sh` or run the "VS Code Task: Start App" to start the project locally.
217
+
VS Code: Run the "VS Code Task: Start App" task.
218
218
219
+
It's also possible to enable hotloading or the VS Code debugger.
219
220
See more tips in [the local development guide](docs/localdev.md).
220
221
221
222
## Using the app
@@ -241,61 +242,35 @@ The resource group and all the resources will be deleted.
241
242
242
243
## Guidance
243
244
244
-
Besides the tips below, you can find extensive documentation in the [docs](docs/README.md) folder.
245
-
246
-
### Customizing the UI and data
247
-
248
-
Once you successfully deploy the app, you can start customizing it for your needs: changing the text, tweaking the prompts, and replacing the data. Consult the [app customization guide](docs/customization.md) as well as the [data ingestion guide](docs/data_ingestion.md) for more details.
249
-
250
-
### Monitoring with Application Insights
251
-
252
-
By default, deployed apps use Application Insights for the tracing of each request, along with the logging of errors.
253
-
254
-
To see the performance data, go to the Application Insights resource in your resource group, click on the "Investigate -> Performance" blade and navigate to any HTTP request to see the timing data.
255
-
To inspect the performance of chat requests, use the "Drill into Samples" button to see end-to-end traces of all the API calls made for any chat request:
To see any exceptions and server errors, navigate to the "Investigate -> Failures" blade and use the filtering tools to locate a specific exception. You can see Python stack traces on the right-hand side.
260
-
261
-
You can also see chart summaries on a dashboard by running the following command:
262
-
263
-
```shell
264
-
azd monitor
265
-
```
266
-
267
-
### Productionizing
268
-
269
-
This sample is designed to be a starting point for your own production application,
270
-
but you should do a thorough review of the security and performance before deploying
271
-
to production. Read through our [productionizing guide](docs/productionizing.md) for more details.
272
-
273
-
### Troubleshooting
274
-
275
-
Here are the most common failure scenarios and solutions:
276
-
277
-
1. The subscription (`AZURE_SUBSCRIPTION_ID`) doesn't have access to the Azure OpenAI service. Please ensure `AZURE_SUBSCRIPTION_ID` matches the ID specified in the [OpenAI access request process](https://aka.ms/oai/access).
278
-
279
-
1. You're attempting to create resources in regions not enabled for Azure OpenAI (e.g. East US 2 instead of East US), or where the model you're trying to use isn't enabled. See [this matrix of model availability](https://aka.ms/oai/models).
280
-
281
-
1. You've exceeded a quota, most often number of resources per region. See [this article on quotas and limits](https://aka.ms/oai/quotas).
282
-
283
-
1. You're getting "same resource name not allowed" conflicts. That's likely because you've run the sample multiple times and deleted the resources you've been creating each time, but are forgetting to purge them. Azure keeps resources for 48 hours unless you purge from soft delete. See [this article on purging resources](https://learn.microsoft.com/azure/cognitive-services/manage-resources?tabs=azure-portal#purge-a-deleted-resource).
284
-
285
-
1. You see `CERTIFICATE_VERIFY_FAILED` when the `prepdocs.py` script runs. That's typically due to incorrect SSL certificates setup on your machine. Try the suggestions in this [StackOverflow answer](https://stackoverflow.com/questions/35569042/ssl-certificate-verify-failed-with-python3/43855394#43855394).
286
-
287
-
1. After running `azd up` and visiting the website, you see a '404 Not Found'in the browser. Wait 10 minutes and try again, as it might be still starting up. Then try running `azd deploy` and wait again. If you still encounter errors with the deployed app and are deploying to App Service, consult the [guide on debugging App Service deployments](docs/appservice.md). Please file an issue if the logs don't help you resolve the error.
245
+
You can find extensive documentation in the [docs](docs/README.md) folder:
- [Additional documentation for this app](docs/README.md)
292
-
- [📖 Revolutionize your Enterprise Data with ChatGPT: Next-gen Apps w/ Azure OpenAI and AI Search](https://techcommunity.microsoft.com/blog/azure-ai-services-blog/revolutionize-your-enterprise-data-with-chatgpt-next-gen-apps-w-azure-openai-and/3762087)
293
-
- [📖 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/)
296
-
- [📖 Access Control in Generative AI applications with Azure AI Search](https://techcommunity.microsoft.com/blog/azure-ai-services-blog/access-control-in-generative-ai-applications-with-azure-ai-search/3956408)
297
-
- [📺 Quickly build and deploy OpenAI apps on Azure, infused with your own data](https://www.youtube.com/watch?v=j8i-OM5kwiY)
298
-
- [📺 AI Chat App Hack series](https://www.youtube.com/playlist?list=PL5lwDBUC0ag6_dGZst5m3G72ewfwXLcXV)
267
+
- [📖 Blog: Revolutionize your Enterprise Data with ChatGPT: Next-gen Apps w/ Azure OpenAI and AI Search](https://techcommunity.microsoft.com/blog/azure-ai-services-blog/revolutionize-your-enterprise-data-with-chatgpt-next-gen-apps-w-azure-openai-and/3762087)
268
+
- [📖 Docs: Azure AI Search](https://learn.microsoft.com/azure/search/search-what-is-azure-search)
- [📖 Docs: Comparing Azure OpenAI and OpenAI](https://learn.microsoft.com/azure/cognitive-services/openai/overview#comparing-azure-openai-and-openai/)
271
+
- [📖 Blog: Access Control in Generative AI applications with Azure AI Search](https://techcommunity.microsoft.com/blog/azure-ai-services-blog/access-control-in-generative-ai-applications-with-azure-ai-search/3956408)
272
+
- [📺 Talk: Quickly build and deploy OpenAI apps on Azure, infused with your own data](https://www.youtube.com/watch?v=j8i-OM5kwiY)
273
+
- [📺 Talks: AI Chat App Hack series](https://www.youtube.com/playlist?list=PL5lwDBUC0ag6_dGZst5m3G72ewfwXLcXV)
If you are experiencing an error when deploying the RAG chat solution using the [deployment steps](../README.md#deploying), this guide will help you troubleshoot common issues.
4
+
5
+
1. You're attempting to create resources in regions not enabled for Azure OpenAI (e.g. East US 2 instead of East US), or where the model you're trying to use isn't enabled. See [this matrix of model availability](https://aka.ms/oai/models).
6
+
7
+
1. You've exceeded a quota, most often number of resources per region. See [this article on quotas and limits](https://aka.ms/oai/quotas).
8
+
9
+
1. You're getting "same resource name not allowed" conflicts. That's likely because you've run the sample multiple times and deleted the resources you've been creating each time, but are forgetting to purge them. Azure keeps resources for 48 hours unless you purge from soft delete. See [this article on purging resources](https://learn.microsoft.com/azure/cognitive-services/manage-resources?tabs=azure-portal#purge-a-deleted-resource).
10
+
11
+
1. You see `CERTIFICATE_VERIFY_FAILED` when the `prepdocs.py` script runs. That's typically due to incorrect SSL certificates setup on your machine. Try the suggestions in this [StackOverflow answer](https://stackoverflow.com/questions/35569042/ssl-certificate-verify-failed-with-python3/43855394#43855394).
12
+
13
+
1. After running `azd up` and visiting the website, you see a '404 Not Found' in the browser. Wait 10 minutes and try again, as it might be still starting up. Then try running `azd deploy` and wait again. If you still encounter errors with the deployed app and are deploying to App Service, consult the [guide on debugging App Service deployments](/docs/appservice.md). Please file an issue if the logs don't help you resolve the error.
Copy file name to clipboardExpand all lines: docs/localdev.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,21 @@ After deploying the app to Azure, you may want to continue development locally.
14
14
You can only run locally **after** having successfully run the `azd up` command. If you haven't yet, follow the steps in [Azure deployment](../README.md#azure-deployment) above.
15
15
16
16
1. Run `azd auth login`
17
-
2. Change dir to `app`
18
-
3. Run `./start.ps1` or `./start.sh` or run the "VS Code Task: Start App" to start the project locally.
0 commit comments