Skip to content

Commit dcc9879

Browse files
Adding table of contents to main readme (#554)
* Adding table of contents to main readme * Update README.md headings --------- Co-authored-by: Pamela Fox <[email protected]>
1 parent 424c8d8 commit dcc9879

File tree

1 file changed

+52
-22
lines changed

1 file changed

+52
-22
lines changed

README.md

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# ChatGPT + Enterprise data with Azure OpenAI and Cognitive Search
22

3+
## Table of Contents
4+
5+
- [Features](#features)
6+
- [Getting started](#getting-started)
7+
- [Azure deployment](#azure-deployment)
8+
- [Cost estimation](#cost-estimation)
9+
- [Prerequisites](#prerequisites)
10+
- [To run locally](#to-run-locally)
11+
- [To run in GitHub Codespaces or VS Code Remote Containers](#to-run-in-github-codespaces-or-vs-code-remote-containers)
12+
- [Project initialization](#project-initialization)
13+
- [Deploying from scratch](#deploying-from-scratch)
14+
- [Deploying with existing resources](#deploying-with-existing-resources)
15+
- [Deploying again](#deploying-again)
16+
- [Sharing environments](#sharing-environments)
17+
- [Enabling optional features](#enabling-optional-features)
18+
- [Enabling Application Insights](#enabling-application-insights)
19+
- [Enabling authentication](#enabling-authentication)
20+
- [Using the app](#using-the-app)
21+
- [Running locally](#running-locally)
22+
- [Resources](#resources)
23+
- [Note](#note)
24+
- [FAQ](#faq)
25+
- [Troubleshooting](#troubleshooting)
26+
327
[![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)
428
[![Open in Remote - Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Remote%20-%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)
529

@@ -19,11 +43,13 @@ The repo includes sample data so it's ready to try end to end. In this sample ap
1943

2044
![Chat screen](docs/chatscreen.png)
2145

22-
## Getting Started
46+
## Getting started
2347

2448
> **IMPORTANT:** In order to deploy and run this example, you'll need an **Azure subscription with access enabled for the Azure OpenAI service**. You can request access [here](https://aka.ms/oaiapply). You can also visit [here](https://azure.microsoft.com/free/cognitive-search/) to get some free Azure credits to get you started.
2549
26-
## Azure Deployment Costs
50+
## Azure deployment
51+
52+
### Cost estimation
2753

2854
Pricing varies per region and usage, so it isn't possible to predict exact costs for your usage.
2955
However, you can try the [Azure pricing calculator](https://azure.com/e/8ffbe5b1919c4c72aed89b022294df76) for the resources below.
@@ -42,7 +68,7 @@ either by deleting the resource group in the Portal or running `azd down`.
4268

4369
### Prerequisites
4470

45-
#### To Run Locally
71+
#### To run locally
4672

4773
* [Azure Developer CLI](https://aka.ms/azure-dev/install)
4874
* [Python 3.9+](https://www.python.org/downloads/)
@@ -62,16 +88,14 @@ You can run this repo virtually by using GitHub Codespaces or VS Code Remote Con
6288
[![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)
6389
[![Open in Remote - Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Remote%20-%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)
6490

65-
### Installation
66-
67-
#### Project Initialization
91+
### Project initialization
6892

6993
1. Create a new folder and switch to it in the terminal
7094
1. Run `azd auth login`
7195
1. Run `azd init -t azure-search-openai-demo`
7296
* note that this command will initialize a git repository and you do not need to clone this repository
7397

74-
#### Starting from scratch
98+
### Deploying from scratch
7599

76100
Execute the following command, if you don't have any pre-existing Azure services and want to start from a fresh deployment.
77101

@@ -85,7 +109,7 @@ It will look like the following:
85109

86110
> NOTE: It may take a minute for the application to be fully deployed. If you see a "Python Developer" welcome screen, then wait a minute and refresh the page.
87111
88-
#### Using existing resources
112+
### Deploying with existing resources
89113

90114
1. Run `azd env set AZURE_OPENAI_SERVICE {Name of existing OpenAI service}`
91115
1. Run `azd env set AZURE_OPENAI_RESOURCE_GROUP {Name of existing resource group that OpenAI service is provisioned to}`
@@ -95,7 +119,7 @@ It will look like the following:
95119

96120
> NOTE: You can also use existing Search and Storage Accounts. See `./infra/main.parameters.json` for list of environment variables to pass to `azd env set` to configure those existing resources.
97121
98-
#### Deploying again
122+
### Deploying again
99123

100124
If you've only changed the backend/frontend code in the `app` folder, then you don't need to re-provision the Azure resources. You can just run:
101125

@@ -105,13 +129,8 @@ If you've changed the infrastructure files (`infra` folder or `azure.yaml`), the
105129

106130
```azd up```
107131

108-
#### Running locally
109-
110-
1. Run `azd login`
111-
2. Change dir to `app`
112-
3. Run `./start.ps1` or `./start.sh` or run the "VS Code Task: Start App" to start the project locally.
113132

114-
#### Sharing Environments
133+
## Sharing environments
115134

116135
To give someone else access to a completely deployed and existing environment,
117136
either you or they can follow these steps:
@@ -123,7 +142,9 @@ either you or they can follow these steps:
123142
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`.
124143
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.
125144

126-
#### Enabling Application Insights
145+
## Enabling optional features
146+
147+
### Enabling Application Insights
127148

128149
To enable Application Insights and the tracing of each request, along with the logging of errors, set the `AZURE_USE_APPLICATION_INSIGHTS` variable to true before running `azd up`
129150

@@ -137,7 +158,21 @@ To inspect the performance of chat requests, use the "Drill into Samples" button
137158

138159
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.
139160

140-
### Quickstart
161+
### Enabling authentication
162+
163+
By default, the deployed Azure web app will have no authentication or access restrictions enabled, meaning anyone with routable network access to the web app can chat with your indexed data. You can require authentication to your Azure Active Directory by following the [Add app authentication](https://learn.microsoft.com/azure/app-service/scenario-secure-app-authentication-app-service) tutorial and set it up against the deployed web app.
164+
165+
To then limit access to a specific set of users or groups, you can follow the steps from [Restrict your Azure AD app to a set of users](https://learn.microsoft.com/azure/active-directory/develop/howto-restrict-your-app-to-a-set-of-users) by changing "Assignment Required?" option under the Enterprise Application, and then assigning users/groups access. Users not granted explicit access will receive the error message -AADSTS50105: Your administrator has configured the application <app_name> to block users unless they are specifically granted ('assigned') access to the application.-
166+
167+
## Running locally
168+
169+
You can only run locally **after** having successfully run the `azd up` command.
170+
171+
1. Run `azd auth login`
172+
2. Change dir to `app`
173+
3. Run `./start.ps1` or `./start.sh` or run the "VS Code Task: Start App" to start the project locally.
174+
175+
## Using the app
141176

142177
* 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.
143178
* Running locally: navigate to 127.0.0.1:50505
@@ -148,11 +183,6 @@ Once in the web app:
148183
* Explore citations and sources
149184
* Click on "settings" to try different options, tweak prompts, etc.
150185

151-
### Enabling authentication
152-
By default, the deployed Azure web app will have no authentication or access restrictions enabled, meaning anyone with routable network access to the web app can chat with your indexed data. You can require authentication to your Azure Active Directory by following the [Add app authentication](https://learn.microsoft.com/azure/app-service/scenario-secure-app-authentication-app-service) tutorial and set it up against the deployed web app.
153-
154-
To then limit access to a specific set of users or groups, you can follow the steps from [Restrict your Azure AD app to a set of users](https://learn.microsoft.com/azure/active-directory/develop/howto-restrict-your-app-to-a-set-of-users) by changing "Assignment Required?" option under the Enterprise Application, and then assigning users/groups access. Users not granted explicit access will receive the error message -AADSTS50105: Your administrator has configured the application <app_name> to block users unless they are specifically granted ('assigned') access to the application.-
155-
156186
## Resources
157187

158188
* [Revolutionize your Enterprise Data with ChatGPT: Next-gen Apps w/ Azure OpenAI and Cognitive Search](https://aka.ms/entgptsearchblog)

0 commit comments

Comments
 (0)