Skip to content

Commit 501d4bf

Browse files
authored
docs: remove content docs/readme
1 parent da87d65 commit 501d4bf

File tree

1 file changed

+0
-208
lines changed

1 file changed

+0
-208
lines changed

docs/readme.md

-208
Original file line numberDiff line numberDiff line change
@@ -1,209 +1 @@
1-
---
2-
page_type: sample
3-
languages:
4-
- azdeveloper
5-
- javascript
6-
- typescript
7-
- nodejs
8-
- bicep
9-
- html
10-
products:
11-
- azure
12-
- azure-openai
13-
- azure-container-apps
14-
- entra-id
15-
urlFragment: llama-index-javascript
16-
name: "Serverless Azure OpenAI Quick Start with LlamaIndex"
17-
description: A sample project that showcases how to use and deploy LlamaIndex application on Azure using azd.
18-
---
191

20-
## Features
21-
22-
This project demonstrates how to build a simple LlamaIndex application using Azure OpenAI. The app is set up as a chat interface that can answer questions about your data. You can add arbitrary data sources to your chat, like local files, websites, or data retrieved from a database. The app will ingest any supported files you put in `./data/` directory. This sample app uses LlamaIndex.TS that is able to ingest any PDF, text, CSV, Markdown, Word and HTML files.
23-
24-
## Architecture Diagram
25-
26-
![Screenshot showing the chatgpt app high level diagram](/docs/architecture-diagram-llama-index-javascript.png)
27-
28-
This application is built around a single component:
29-
30-
- A full-stack Next.js application that is hosted on [Azure Container Apps](https://learn.microsoft.com/azure/container-apps/) in just a few commands. This app uses [LlamaIndex.TS](https://github.com/run-llama/LlamaIndexTS), a TypeScript library that can ingest any PDF, text, CSV, Markdown, Word and HTML files.
31-
32-
- The app uses [Azure OpenAI](https://learn.microsoft.com/azure/ai-services/openai/overview) to answer questions about the data you provide. The app is set up to use the `gpt-35-turbo` model and embeddings to provide the best and fastest answers to your questions.
33-
34-
## Getting Started
35-
36-
You have a few options for getting started with this template. The quickest way to get started is [GitHub Codespaces](#github-codespaces), since it will setup all the tools for you, but you can also [set it up locally](#local-environment). You can also use a [VS Code dev container](#vs-code-dev-containers)
37-
38-
This template uses `gpt-35-turbo` version `1106` which may not be available in all Azure regions. Check for [up-to-date region availability](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#standard-deployment-model-availability) and select a region during deployment accordingly
39-
40-
* We recommend using `swedencentral`
41-
42-
### GitHub Codespaces
43-
44-
You can run this template virtually by using GitHub Codespaces. The button will open a web-based VS Code instance in your browser:
45-
46-
1. Open the template (this may take several minutes)
47-
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Azure-Samples/llama-index-javascript?hide_repo_select=true&ref&quickstart=true)
48-
2. Open a terminal window
49-
3. Sign into your Azure account:
50-
51-
```shell
52-
azd auth login
53-
```
54-
4. Provision the Azure resources and deploy your code:
55-
56-
```shell
57-
azd up
58-
```
59-
5. Install the app dependencies:
60-
61-
```bash
62-
npm install
63-
```
64-
65-
### VS Code Dev Containers
66-
67-
A related option is VS Code Dev Containers, which will open the project in your local VS Code using the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers):
68-
69-
1. Start Docker Desktop (install it if not already installed)
70-
2. Open the project:
71-
[![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/llama-index-javascript)
72-
3. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window.
73-
4. Sign into your Azure account:
74-
75-
```shell
76-
azd auth login
77-
```
78-
5. Provision the Azure resources and deploy your code:
79-
80-
```shell
81-
azd up
82-
```
83-
6. Install the app dependencies:
84-
85-
```bash
86-
npm install
87-
```
88-
7. Configure a CI/CD pipeline:
89-
90-
```shell
91-
azd pipeline config
92-
```
93-
94-
To start the web app, run the following command:
95-
96-
```bash
97-
npm run dev
98-
```
99-
100-
Open the URL `http://localhost:3000` in your browser to interact with the bot.
101-
102-
### Local Environment
103-
104-
#### Prerequisites
105-
106-
You need to install following tools to work on your local machine:
107-
108-
- [Docker](https://docs.docker.com/get-docker)
109-
- [Node.js LTS](https://nodejs.org/download/)
110-
- [Azure Developer CLI](https://aka.ms/azure-dev/install)
111-
- [Git](https://git-scm.com/downloads)
112-
- [PowerShell 7+](https://github.com/powershell/powershell) _(for Windows users only)_
113-
- **Important**: Ensure you can run `pwsh.exe` from a PowerShell command. If this fails, you likely need to upgrade PowerShell.
114-
- Instead of Powershell, you can also use Git Bash or WSL to run the Azure Developer CLI commands.
115-
- This template uses `gpt-35-turbo` version `1106` which may not be available in all Azure regions. Check for [up-to-date region availability](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#standard-deployment-model-availability) and select a region during deployment accordingly
116-
* We recommend using `swedencentral`
117-
118-
Then you can get the project code:
119-
120-
1. [**Fork**](https://github.com/Azure-Samples/llama-index-javascript/fork) the project to create your own copy of this repository.
121-
2. On your forked repository, select the **Code** button, then the **Local** tab, and copy the URL of your forked repository.
122-
3. Open a terminal and run this command to clone the repo: <code> git clone &lt;your-repo-url&gt; </code>
123-
124-
#### Quickstart (with Azure OpenAI models)
125-
126-
1. Bring down the template code:
127-
128-
```shell
129-
azd init --template llama-index-javascript
130-
```
131-
132-
This will perform a git clone
133-
134-
2. Sign into your Azure account:
135-
136-
```shell
137-
azd auth login
138-
```
139-
140-
3. Install all dependencies:
141-
142-
```bash
143-
npm install
144-
```
145-
4. Provision and deploy the project to Azure:
146-
147-
```shell
148-
azd up
149-
```
150-
4. Configure a CI/CD pipeline:
151-
152-
```shell
153-
azd pipeline config
154-
```
155-
156-
Once your deployment is complete, you should see a `.env` file at the root of the project. This file contains the environment variables needed to run the application using Azure resources.
157-
158-
#### Local Development
159-
160-
To run the sample, run the following commands, which will start the Next.js app.
161-
162-
1. Open a terminal and navigate to the root of the project, then run app:
163-
164-
```bash
165-
npm run dev
166-
167-
Open the URL `http://localhost:3000` in your browser to interact with the Assistant.
168-
169-
## Guidance
170-
171-
### Region Availability
172-
173-
This template uses `gpt-35-turbo` version `1106` which may not be available in all Azure regions. Check for [up-to-date region availability](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#standard-deployment-model-availability) and select a region during deployment accordingly
174-
* We recommend using `swedencentral`
175-
176-
### Costs
177-
178-
Pricing varies per region and usage, so it isn't possible to predict exact costs for your usage.
179-
However, you can use the [Azure pricing calculator](https://azure.com/e/bf51ef20b57a4da08e47511938ad5415) for the resources below to get an estimate.
180-
181-
- Azure Container Apps: Consumption plan, Free for the first 2M executions. Pricing per execution and memory used. [Pricing](https://azure.microsoft.com/en-us/pricing/details/container-apps/)
182-
- Azure OpenAI: Standard tier, GPT and Ada models. Pricing per 1K tokens used, and at least 1K tokens are used per question. [Pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/)
183-
184-
> [!WARNING]
185-
> To avoid unnecessary costs, remember to take down your app if it's no longer in use, either by deleting the resource group in the Portal or running `azd down --purge`.
186-
187-
### Security
188-
189-
> [!NOTE]
190-
> When implementing this template please specify whether the template uses Managed Identity or Key Vault
191-
192-
This template has either [Managed Identity](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview) or Key Vault built in to eliminate the need for developers to manage these credentials. Applications can use managed identities to obtain Microsoft Entra tokens without having to manage any credentials. Additionally, we have added a [GitHub Action tool](https://github.com/microsoft/security-devops-action) that scans the infrastructure-as-code files and generates a report containing any detected issues. To ensure best practices in your repo we recommend anyone creating solutions based on our templates ensure that the [Github secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning) setting is enabled in your repos.
193-
194-
195-
## Resources
196-
197-
Here are some resources to learn more about the technologies used in this sample:
198-
199-
- [LlamaIndexTS Documentation](https://ts.llamaindex.ai) - learn about LlamaIndex (Typescript features).
200-
- [Generative AI For Beginners](https://github.com/microsoft/generative-ai-for-beginners)
201-
- [Azure OpenAI Service](https://learn.microsoft.com/azure/ai-services/openai/overview)
202-
- [Azure OpenAI Assistant Builder](https://github.com/Azure-Samples/azure-openai-assistant-builder)
203-
- [Chat + Enterprise data with Azure OpenAI and Azure AI Search](https://github.com/Azure-Samples/azure-search-openai-javascript)
204-
205-
You can also find [more Azure AI samples here](https://github.com/Azure-Samples/azureai-samples).
206-
207-
## Troubleshooting
208-
209-
If you can't find a solution to your problem, please [open an issue](https://github.com/Azure-Samples/llama-index-javascript/issues) in this repository.

0 commit comments

Comments
 (0)