Skip to content

Commit c21aac3

Browse files
authored
Updates to Markdown files (links, lint, wording) (#1700)
* Add GitHub action * Add GitHub action * Markdown lint, try to get running * Markdown lint * Update markdown lint * Fix markdown lint issues
1 parent e2d6ca3 commit c21aac3

19 files changed

+345
-365
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Validate Markdown
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- '**.md'
9+
10+
jobs:
11+
lint-markdown:
12+
name: Check for Markdown linting errors
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v4
17+
- name: Run markdownlint
18+
uses: articulate/actions-markdownlint@v1
19+
with:
20+
config: .github/workflows/markdownlint-config.json
21+
files: '**/*.md'
22+
ignore: data/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"default": true,
3+
"line-length": false,
4+
"MD033": { "allowed_elements": ["br", "details", "summary"] }
5+
}

.github/workflows/validate-markdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Validate Markdown
33
on:
44
# Trigger the workflow on pull request
55
pull_request_target:
6-
branches:
6+
branches:
77
- main
88
paths:
99
- '**.md'

CHANGELOG.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

LICENSE.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff 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)
22

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).
74

85
## Table of Contents
96

@@ -55,11 +52,11 @@ The repo includes sample data so it's ready to try end to end. In this sample ap
5552

5653
**IMPORTANT:** In order to deploy and run this example, you'll need:
5754

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.
6360

6461
## Azure deployment
6562

@@ -108,14 +105,14 @@ A related option is VS Code Dev Containers, which will open the project in your
108105

109106
1. Install the required tools:
110107

111-
* [Azure Developer CLI](https://aka.ms/azure-dev/install)
112-
* [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.
108+
- [Azure Developer CLI](https://aka.ms/azure-dev/install)
109+
- [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.
119116

120117
2. Create a new folder and switch to it in the terminal.
121118
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:
146143
This will create a new folder in the `.azure` folder, and set it as the active environment for any calls to `azd` going forward.
147144
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).
148145
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 select two 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 select two 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.
151148
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.
152149
It will look like the following:
153150

@@ -165,7 +162,6 @@ If you've changed the infrastructure files (`infra` folder or `azure.yaml`), the
165162

166163
```azd up```
167164

168-
169165
## Sharing environments
170166

171167
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).
190186

191187
## Using the app
192188

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
195191

196192
Once in the web app:
197193

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.
201197

202198
## Monitoring with Application Insights
203199

@@ -254,15 +250,14 @@ Here are the most common failure scenarios and solutions:
254250
255251
## Resources
256252
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)
260-
* [📖 Azure OpenAI Service](https://learn.microsoft.com/azure/cognitive-services/openai/overview)
261-
* [📖 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)
256+
- [📖 Azure OpenAI Service](https://learn.microsoft.com/azure/cognitive-services/openai/overview)
257+
- [📖 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)
266261
267262
### Getting help
268263

app/frontend/src/pages/ask/Ask.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export function Component(): JSX.Element {
125125
gpt4v_input: gpt4vInput
126126
}
127127
},
128-
// ChatAppProtocol: Client must pass on any session state received from the server
128+
// AI Chat Protocol: Client must pass on any session state received from the server
129129
session_state: answer ? answer.session_state : null
130130
};
131131
const result = await askApi(request, token);

app/frontend/src/pages/chat/Chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const Chat = () => {
174174
gpt4v_input: gpt4vInput
175175
}
176176
},
177-
// ChatAppProtocol: Client must pass on any session state received from the server
177+
// AI Chat Protocol: Client must pass on any session state received from the server
178178
session_state: answers.length ? answers[answers.length - 1][1].session_state : null
179179
};
180180

docs/README.md

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

66
* [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)
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)
1313
* [Debugging the app on App Service](appservice.md)
1414
* [Local development](localdev.md)
1515
* [App customization](customization.md)

docs/appservice.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ We recommend always waiting 10 minutes, to give the server time to properly star
2020

2121
If you still see a 500 error after 10 minutes:
2222

23-
1. [Check the deployment logs](#checking-the-deployment-logs)
23+
1. [Check the deployment logs](#checking-the-deployment-logs-for-errors)
2424
2. [Look for errors in the app logs](#checking-the-app-logs-for-errors)
2525
3. [Look for errors in Azure Monitor](#checking-azure-monitor-for-errors)
2626

@@ -536,9 +536,9 @@ Done in 522 sec(s).
536536

537537
Look for these important steps in the Oryx build:
538538

539-
* _Detected following platforms: python: 3.11.7_
539+
- _Detected following platforms: python: 3.11.7_
540540
That should match your runtime in the App Service configuration.
541-
* _Running pip install..._
541+
- _Running pip install..._
542542
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.
543543

544544
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.
610610

611611
A few notable logs:
612612

613-
* `2024-02-08T19:30:33.441385332Z Site's appCommandLine: python3 -m gunicorn main:app`
613+
- `2024-02-08T19:30:33.441385332Z Site's appCommandLine: python3 -m gunicorn main:app`
614614
This log indicates that App Service was correctly configured with a custom startup command to run the app.
615-
* `[2024-02-08 19:31:11 +0000] [75] [INFO] Starting gunicorn 20.1.0`
615+
- `[2024-02-08 19:31:11 +0000] [75] [INFO] Starting gunicorn 20.1.0`
616616
That's the start of the gunicorn server serving the app.
617-
* `2024-02-08T19:32:20.726942614Z [2024-02-08 19:32:20 +0000] [77] [INFO] Application startup complete.`
617+
- `2024-02-08T19:32:20.726942614Z [2024-02-08 19:32:20 +0000] [77] [INFO] Application startup complete.`
618618
At this point, the app has started successfully.
619619

620620
If you do not see any errors in those logs, then the app should be running successfully. If you do see errors, then try looking in Azure Monitor.

0 commit comments

Comments
 (0)