Skip to content

Commit 57e6bba

Browse files
authored
Refactor the README to move advanced sections into docs (#2165)
* Refactor the docs * Update docs readme * Colon * Update start commands
1 parent 202e726 commit 57e6bba

File tree

7 files changed

+143
-138
lines changed

7 files changed

+143
-138
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,59 +12,15 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
1212
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
1313
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
1414

15-
- [Code of Conduct](#code-of-conduct)
16-
- [Found an Issue?](#found-an-issue)
17-
- [Want a Feature?](#want-a-feature)
18-
- [Submission Guidelines](#submission-guidelines)
19-
- [Submitting an Issue](#submitting-an-issue)
20-
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
15+
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
2116
- [Setting up the development environment](#setting-up-the-development-environment)
2217
- [Running unit tests](#running-unit-tests)
2318
- [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)
2622

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)
6824

6925
Before you submit your Pull Request (PR) consider the following guidelines:
7026

@@ -135,7 +91,7 @@ playwright show-trace test-results/<trace-zip>
13591

13692
You can also use the online trace viewer at <https://trace.playwright.dev/>
13793

138-
## Code Style
94+
## Code style
13995

14096
This codebase includes several languages: TypeScript, Python, Bicep, Powershell, and Bash.
14197
Code should follow the standard conventions of each language.
@@ -169,3 +125,21 @@ When adding new azd environment variables, please remember to update:
169125
1. App Service's [azure.yaml](./azure.yaml)
170126
1. [ADO pipeline](.azdo/pipelines/azure-dev.yml).
171127
1. [Github workflows](.github/workflows/azure-dev.yml)
128+
129+
## Adding new UI strings
130+
131+
When adding new UI strings, please remember to update all translations.
132+
For any translations that you generate with an AI tool,
133+
please indicate in the PR description which language's strings were AI-generated.
134+
135+
Here are community contributors that can review translations:
136+
137+
| Language | Contributor |
138+
|----------|---------------------|
139+
| Danish | @EMjetrot |
140+
| French | @manekinekko |
141+
| Japanese | @bnodir |
142+
| Norwegian| @@jeannotdamoiseaux |
143+
| Portugese| @glaucia86 |
144+
| Spanish | @miguelmsft |
145+
| Turkish | @mertcakdogan |

README.md

Lines changed: 47 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ This solution's backend is written in Python. There are also [**JavaScript**](ht
2626
[![Open in GitHub Codespaces](https://img.shields.io/static/v1?style=for-the-badge&label=GitHub+Codespaces&message=Open&color=brightgreen&logo=github)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=599293758&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=WestUs2)
2727
[![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/azure-samples/azure-search-openai-demo)
2828

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+
2933
## Table of Contents
3034

3135
- [Features](#features)
@@ -37,15 +41,10 @@ This solution's backend is written in Python. There are also [**JavaScript**](ht
3741
- [Local environment](#local-environment)
3842
- [Deploying](#deploying)
3943
- [Deploying again](#deploying-again)
40-
- [Sharing environments](#sharing-environments)
41-
- [Running locally](#running-locally)
44+
- [Running the development server](#running-the-development-server)
4245
- [Using the app](#using-the-app)
4346
- [Clean up](#clean-up)
4447
- [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)
4948
- [Resources](#resources)
5049

5150
![Chat screen](docs/images/chatscreen.png)
@@ -196,26 +195,28 @@ If you've changed the infrastructure files (`infra` folder or `azure.yaml`), the
196195
azd up
197196
```
198197

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:
200204
201-
To give someone else access to a completely deployed and existing environment,
202-
either you or they can follow these steps:
205+
Windows:
203206
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+
```
210210
211-
## Running locally
211+
Linux/Mac:
212212
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+
```
214216
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.
218218
219+
It's also possible to enable hotloading or the VS Code debugger.
219220
See more tips in [the local development guide](docs/localdev.md).
220221

221222
## Using the app
@@ -241,61 +242,35 @@ The resource group and all the resources will be deleted.
241242

242243
## Guidance
243244

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:
256-
257-
![Tracing screenshot](docs/images/transaction-tracing.png)
258-
259-
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:
246+
247+
- Deploying:
248+
- [Troubleshooting deployment](docs/deploy_troubleshooting.md)
249+
- [Debugging the app on App Service](docs/appservice.md)
250+
- [Deploying with azd: deep dive and CI/CD](docs/azd.md)
251+
- [Deploying with existing Azure resources](docs/deploy_existing.md)
252+
- [Deploying from a free account](docs/deploy_lowcost.md)
253+
- [Enabling optional features](docs/deploy_features.md)
254+
- [Login and access control](docs/login_and_acl.md)
255+
- [GPT-4 Turbo with Vision](docs/gpt4v.md)
256+
- [Private endpoints](docs/deploy_private.md)
257+
- [Sharing deployment environments](docs/sharing_environments.md)
258+
- [Local development](docs/localdev.md)
259+
- [Customizing the app](docs/customization.md)
260+
- [Data ingestion](docs/data_ingestion.md)
261+
- [Monitoring with Application Insights](docs/monitoring.md)
262+
- [Productionizing](docs/productionizing.md)
263+
- [Alternative RAG chat samples](docs/other_samples.md)
288264

289265
### Resources
290266

291-
- [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)
294-
- [📖 Azure OpenAI Service](https://learn.microsoft.com/azure/cognitive-services/openai/overview)
295-
- [📖 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)
269+
- [📖 Docs: Azure OpenAI Service](https://learn.microsoft.com/azure/cognitive-services/openai/overview)
270+
- [📖 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)
299274

300275
### Getting help
301276

docs/README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
Consult the main [README](../README.md) for general information about the project.
44
These are advanced topics that are not necessary for a basic deployment.
55

6-
* [Deploying with the Azure Developer CLI](azd.md)
7-
* [Deploying with existing Azure resources](deploy_existing.md)
8-
* [Deploying from a free account](deploy_lowcost.md)
9-
* [Enabling optional features](deploy_features.md)
10-
* [Login and access control](login_and_acl.md)
11-
* [GPT-4 Turbo with Vision](gpt4v.md)
12-
* [Private endpoints](deploy_private.md)
13-
* [Debugging the app on App Service](appservice.md)
14-
* [Local development](localdev.md)
15-
* [App customization](customization.md)
16-
* [Private access](deploy_private.md)
17-
* [Data ingestion](data_ingestion.md)
18-
* [Productionizing](productionizing.md)
19-
* [Alternative RAG chat samples](other_samples.md)
6+
- Deploying:
7+
- [Troubleshooting deployment](docs/deploy_troubleshooting.md)
8+
- [Debugging the app on App Service](appservice.md)
9+
- [Deploying with azd: deep dive and CI/CD](azd.md)
10+
- [Deploying with existing Azure resources](deploy_existing.md)
11+
- [Deploying from a free account](deploy_lowcost.md)
12+
- [Enabling optional features](deploy_features.md)
13+
- [Login and access control](login_and_acl.md)
14+
- [GPT-4 Turbo with Vision](gpt4v.md)
15+
- [Private endpoints](deploy_private.md)
16+
- [Sharing deployment environments](sharing_environments.md)
17+
- [Local development](localdev.md)
18+
- [Customizing the app](customization.md)
19+
- [Data ingestion](data_ingestion.md)
20+
- [Monitoring with Application Insights](monitoring.md)
21+
- [Productionizing](productionizing.md)
22+
- [Alternative RAG chat samples](other_samples.md)

docs/deploy_troubleshooting.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# RAG chat: Troubleshooting deployment
2+
3+
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.

docs/localdev.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,21 @@ After deploying the app to Azure, you may want to continue development locally.
1414
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.
1515

1616
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.
17+
2. Start the server:
18+
19+
Windows:
20+
21+
```shell
22+
./app/start.ps1
23+
```
24+
25+
Linux/Mac:
26+
27+
```shell
28+
./app/start.sh
29+
```
30+
31+
VS Code: Run the "VS Code Task: Start App" task.
1932

2033
## Hot reloading frontend and backend files
2134

0 commit comments

Comments
 (0)