-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
97 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,59 +12,15 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope | |
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or | ||
contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
|
||
- [Code of Conduct](#code-of-conduct) | ||
- [Found an Issue?](#found-an-issue) | ||
- [Want a Feature?](#want-a-feature) | ||
- [Submission Guidelines](#submission-guidelines) | ||
- [Submitting an Issue](#submitting-an-issue) | ||
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr) | ||
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr) | ||
- [Setting up the development environment](#setting-up-the-development-environment) | ||
- [Running unit tests](#running-unit-tests) | ||
- [Running E2E tests](#running-e2e-tests) | ||
- [Code Style](#code-style) | ||
- [Adding new azd environment variables](#add-new-azd-environment-variables) | ||
- [Code style](#code-style) | ||
- [Adding new azd environment variables](#adding-new-azd-environment-variables) | ||
- [Adding new UI strings](#adding-new-ui-strings) | ||
|
||
## Code of Conduct | ||
|
||
Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
|
||
## Found an Issue? | ||
|
||
If you find a bug in the source code or a mistake in the documentation, you can help us by | ||
[submitting an issue](#submitting-an-issue) to the GitHub Repository. Even better, you can | ||
[submit a Pull Request](#submitting-a-pull-request-pr) with a fix. | ||
|
||
## Want a Feature? | ||
|
||
You can *request* a new feature by [submitting an issue](#submitting-an-issue) to the GitHub | ||
Repository. If you would like to *implement* a new feature, please submit an issue with | ||
a proposal for your work first, to be sure that we can use it. | ||
|
||
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submitting-a-pull-request-pr). | ||
|
||
## Submission Guidelines | ||
|
||
### Submitting an Issue | ||
|
||
Before you submit an issue, search the archive, maybe your question was already answered. | ||
|
||
If your issue appears to be a bug, and hasn't been reported, open a new issue. | ||
Help us to maximize the effort we can spend fixing issues and adding new | ||
features, by not reporting duplicate issues. Providing the following information will increase the | ||
chances of your issue being dealt with quickly: | ||
|
||
- **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps | ||
- **Version** - what version is affected (e.g. 0.1.2) | ||
- **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you | ||
- **Browsers and Operating System** - is this a problem with all browsers? | ||
- **Reproduce the Error** - provide a live example or a unambiguous set of steps | ||
- **Related Issues** - has a similar issue been reported before? | ||
- **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be | ||
causing the problem (line of code or commit) | ||
|
||
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]. | ||
|
||
### Submitting a Pull Request (PR) | ||
## Submitting a Pull Request (PR) | ||
|
||
Before you submit your Pull Request (PR) consider the following guidelines: | ||
|
||
|
@@ -135,7 +91,7 @@ playwright show-trace test-results/<trace-zip> | |
|
||
You can also use the online trace viewer at <https://trace.playwright.dev/> | ||
|
||
## Code Style | ||
## Code style | ||
|
||
This codebase includes several languages: TypeScript, Python, Bicep, Powershell, and Bash. | ||
Code should follow the standard conventions of each language. | ||
|
@@ -169,3 +125,21 @@ When adding new azd environment variables, please remember to update: | |
1. App Service's [azure.yaml](./azure.yaml) | ||
1. [ADO pipeline](.azdo/pipelines/azure-dev.yml). | ||
1. [Github workflows](.github/workflows/azure-dev.yml) | ||
|
||
## Adding new UI strings | ||
|
||
When adding new UI strings, please remember to update all translations. | ||
For any translations that you generate with an AI tool, | ||
please indicate in the PR description which language's strings were AI-generated. | ||
|
||
Here are community contributors that can review translations: | ||
|
||
| Language | Contributor | | ||
|----------|---------------------| | ||
| Danish | @EMjetrot | | ||
| French | @manekinekko | | ||
| Japanese | @bnodir | | ||
| Norwegian| @@jeannotdamoiseaux | | ||
| Portugese| @glaucia86 | | ||
| Spanish | @miguelmsft | | ||
| Turkish | @mertcakdogan | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# RAG chat: Troubleshooting deployment | ||
|
||
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. | ||
|
||
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). | ||
|
||
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). | ||
|
||
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). | ||
|
||
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). | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# RAG chat: Monitoring with Application Insights | ||
|
||
By default, deployed apps use Application Insights for the tracing of each request, along with the logging of errors. | ||
|
||
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. | ||
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: | ||
|
||
![Tracing screenshot](docs/images/transaction-tracing.png) | ||
|
||
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. | ||
|
||
You can also see chart summaries on a dashboard by running the following command: | ||
|
||
```shell | ||
azd monitor | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# RAG chat: Sharing deployment environments | ||
|
||
If you've deployed the RAG chat solution already following the steps in the [deployment guide](../README.md#deploying), you may want to share the environment with a colleague. | ||
Either you or they can follow these steps: | ||
|
||
1. Install the [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli) | ||
1. Run `azd init -t azure-search-openai-demo` or clone this repository. | ||
1. Run `azd env refresh -e {environment name}` | ||
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. | ||
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`. | ||
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. |