Skip to content

Commit f1cc948

Browse files
committed
docs: update infra code and doc
1 parent 680cdc7 commit f1cc948

15 files changed

+790
-97
lines changed

.env.example

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# The directory to store the local storage cache.
22
LLAMAINDEX_STORAGE_CACHE_DIR=.cache
33

4-
# FILESERVER_URL_PREFIX is the URL prefix of the server storing the images generated by the interpreter.
5-
FILESERVER_URL_PREFIX=http://localhost:3000/api/files
4+
# LLAMAINDEX_FILESERVER_URL_PREFIX is the URL prefix of the server storing the images generated by the interpreter.
5+
LLAMAINDEX_FILESERVER_URL_PREFIX=http://localhost:3000/api/files
66

77
# Customize prompt to generate the next question suggestions based on the conversation history.
88
# Disable this prompt to disable the next question suggestions feature.
@@ -11,15 +11,26 @@ NEXT_QUESTION_PROMPT="You're a helpful assistant!"
1111
# The system prompt for the AI model.
1212
LLAMAINDEX_SYSTEM_PROMPT="you are an assistant. Always use data_query_engine to answer the user's questions, and query for documents from your data source"
1313

14+
# The backend URI for the Azure Container Apps service.
1415
AZURE_AI_SEARCH_ENDPOINT=https://<service-name>.search.windows.net
1516
AZURE_OPENAI_ENDPOINT=https://<service-name>.openai.azure.com/
16-
AZURE_OPENAI_EMBEDDING_DEPLOYMENT=text-embedding-ada-002
17-
AZURE_OPENAI_CHAT_DEPLOYMENT=gpt-4
18-
AZURE_API_VERSION=2024-09-01-preview
19-
AZURE_AI_SEARCH_INDEX_NAME=llamaindex-vector-search
20-
AZURE_LOG_LEVEL=info
17+
OPENAI_API_VERSION="2024-02-15-preview"
2118

2219
# For local development, you can provide API keys for the services below.
2320
# Make sure to keep these keys secret and never expose them in public repositories.
2421
AZURE_AI_SEARCH_KEY=
25-
OPENAI_API_KEY=
22+
OPENAI_API_KEY=
23+
24+
# Customize the deployment for the OpenAI text embedding model and chat model.
25+
AZURE_OPENAI_EMBEDDING_DEPLOYMENT=text-embedding-ada-002
26+
AZURE_OPENAI_CHAT_DEPLOYMENT=gpt-4
27+
AZURE_API_VERSION=2024-10-01-preview
28+
AZURE_AI_SEARCH_INDEX_NAME=llamaindex-vector-search
29+
AZURE_AI_SEARCH_CHUNK_FIELD="chunk"
30+
AZURE_AI_SEARCH_DOC_ID_FIELD="doc_id"
31+
AZURE_AI_SEARCH_EMBEDDING_FIELD="embedding"
32+
AZURE_AI_SEARCH_ID_FIELD="id"
33+
AZURE_AI_SEARCH_METADATA_FIELD="metadata"
34+
35+
# Optional: Set the log level for the Azure SDKs.
36+
AZURE_LOG_LEVEL=info

CONTRIBUTING.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Contributing
2+
3+
This project welcomes contributions and suggestions. Most contributions require you to agree to a
4+
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
5+
the rights to use your contribution. For details, visit <https://cla.opensource.microsoft.com>.
6+
7+
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
8+
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
9+
provided by the bot. You will only need to do this once across all repos using our CLA.
10+
11+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
12+
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
13+
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
14+
15+
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
16+
- [Setting up the development environment](#setting-up-the-development-environment)
17+
- [Submission Guidelines](#submit)
18+
- [Submit an Issue](#submit-issue)
19+
- [Running unit tests](#running-unit-tests)
20+
- [Code style](#code-style)
21+
- [Adding new azd environment variables](#adding-new-azd-environment-variables)
22+
23+
## Submitting a Pull Request (PR)
24+
25+
Before you submit your Pull Request (PR) consider the following guidelines:
26+
27+
- Search the repository (<https://github.com/Azure-Samples>]/[repository-name]/pulls) for an open or closed PR
28+
that relates to your submission. You don't want to duplicate effort.
29+
- Make your changes in a new git fork
30+
- Follow [Code style conventions](#code-style)
31+
- [Run the tests](#running-unit-tests) (and write new ones, if needed)
32+
- Commit your changes using a descriptive commit message
33+
- Push your fork to GitHub
34+
- In GitHub, create a pull request to the `main` branch of the repository
35+
- Ask a maintainer to review your PR and address any comments they might have
36+
37+
## <a name="submit"></a> Submission Guidelines
38+
39+
### <a name="submit-issue"></a> Submitting an Issue
40+
Before you submit an issue, search the archive, maybe your question was already answered.
41+
42+
If your issue appears to be a bug, and hasn't been reported, open a new issue.
43+
Help us to maximize the effort we can spend fixing issues and adding new
44+
features, by not reporting duplicate issues. Providing the following information will increase the
45+
chances of your issue being dealt with quickly:
46+
47+
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
48+
* **Version** - what version is affected (e.g. 0.1.2)
49+
* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
50+
* **Browsers and Operating System** - is this a problem with all browsers?
51+
* **Reproduce the Error** - provide a live example or a unambiguous set of steps
52+
* **Related Issues** - has a similar issue been reported before?
53+
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
54+
causing the problem (line of code or commit)
55+
56+
You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/Azure-Samples/llamaindex-search-javascript/issues/new].
57+
58+
## Setting up the development environment
59+
60+
Install the development dependencies:
61+
62+
```shell
63+
pnpm install
64+
```
65+
66+
Run the development server:
67+
68+
```shell
69+
pnpm dev
70+
```
71+
72+
Build the project:
73+
74+
```shell
75+
pnpm build
76+
```
77+
78+
## Running unit tests
79+
80+
Run the tests:
81+
82+
```shell
83+
pnpm test
84+
```
85+
86+
## Code style
87+
88+
Run the linter for code style checks:
89+
90+
```shell
91+
pnpm lint
92+
```
93+
94+
## Adding new azd environment variables
95+
96+
When adding new azd environment variables, please remember to update:
97+
98+
1. App Service's [azure.yaml](./azure.yaml)
99+
1. [ADO pipeline](.azdo/pipelines/azure-dev.yml).
100+
1. [Github workflows](.github/workflows/azure-dev.yml)
101+
102+
That's it! Thank you for your contribution!

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Microsoft Corporation
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)