Skip to content

Commit cbd5fd4

Browse files
setup repos with most recent version of project
1 parent da67634 commit cbd5fd4

File tree

159 files changed

+42412
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+42412
-30
lines changed

.devcontainer/devcontainer.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "Azure Developer CLI",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.10",
4+
"features": {
5+
"ghcr.io/devcontainers/features/node:1": {
6+
"version": "16",
7+
"nodeGypDependencies": false
8+
},
9+
"ghcr.io/devcontainers/features/azure-cli:1.0.8": {},
10+
"ghcr.io/azure/azure-dev/azd:latest": {}
11+
},
12+
"customizations": {
13+
"vscode": {
14+
"extensions": [
15+
"ms-azuretools.azure-dev",
16+
"ms-azuretools.vscode-bicep",
17+
"ms-python.python"
18+
]
19+
},
20+
"codespaces": {
21+
"openFiles": [
22+
"README.md"
23+
]
24+
}
25+
},
26+
"forwardPorts": [
27+
5000
28+
],
29+
"remoteUser": "vscode",
30+
"hostRequirements": {
31+
"memory": "8gb"
32+
}
33+
}

.env.sample

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Chat
2+
DEBUG=True
3+
AZURE_OPENAI_RESOURCE=
4+
AZURE_OPENAI_MODEL=
5+
AZURE_OPENAI_KEY=
6+
AZURE_OPENAI_MODEL_NAME=gpt-35-turbo-16k
7+
AZURE_OPENAI_TEMPERATURE=0
8+
AZURE_OPENAI_TOP_P=1.0
9+
AZURE_OPENAI_MAX_TOKENS=1000
10+
AZURE_OPENAI_STOP_SEQUENCE=
11+
AZURE_OPENAI_SEED=
12+
AZURE_OPENAI_CHOICES_COUNT=1
13+
AZURE_OPENAI_PRESENCE_PENALTY=0.0
14+
AZURE_OPENAI_FREQUENCY_PENALTY=0.0
15+
AZURE_OPENAI_LOGIT_BIAS=
16+
AZURE_OPENAI_USER=
17+
AZURE_OPENAI_TOOLS=
18+
AZURE_OPENAI_TOOL_CHOICE=
19+
AZURE_OPENAI_SYSTEM_MESSAGE=You are an AI assistant that helps people find information.
20+
AZURE_OPENAI_PREVIEW_API_VERSION=2024-05-01-preview
21+
AZURE_OPENAI_STREAM=True
22+
AZURE_OPENAI_ENDPOINT=
23+
AZURE_OPENAI_EMBEDDING_NAME=
24+
AZURE_OPENAI_EMBEDDING_ENDPOINT=
25+
AZURE_OPENAI_EMBEDDING_KEY=
26+
# User Interface
27+
UI_TITLE=
28+
UI_LOGO=
29+
UI_CHAT_LOGO=
30+
UI_CHAT_TITLE=
31+
UI_CHAT_DESCRIPTION=
32+
UI_FAVICON=
33+
# Chat history
34+
AZURE_COSMOSDB_ACCOUNT=
35+
AZURE_COSMOSDB_DATABASE=db_conversation_history
36+
AZURE_COSMOSDB_CONVERSATIONS_CONTAINER=conversations
37+
AZURE_COSMOSDB_ACCOUNT_KEY=
38+
AZURE_COSMOSDB_ENABLE_FEEDBACK=False
39+
# Chat with data: common settings
40+
SEARCH_TOP_K=5
41+
SEARCH_STRICTNESS=3
42+
SEARCH_ENABLE_IN_DOMAIN=True
43+
# Chat with data: Azure AI Search
44+
AZURE_SEARCH_SERVICE=
45+
AZURE_SEARCH_INDEX=
46+
AZURE_SEARCH_KEY=
47+
AZURE_SEARCH_SEMANTIC_SEARCH_CONFIG=
48+
AZURE_SEARCH_INDEX_IS_PRECHUNKED=False
49+
AZURE_SEARCH_TOP_K=5
50+
AZURE_SEARCH_ENABLE_IN_DOMAIN=False
51+
AZURE_SEARCH_CONTENT_COLUMNS=
52+
AZURE_SEARCH_FILENAME_COLUMN=
53+
AZURE_SEARCH_TITLE_COLUMN=
54+
AZURE_SEARCH_URL_COLUMN=
55+
AZURE_SEARCH_VECTOR_COLUMNS=
56+
AZURE_SEARCH_QUERY_TYPE=simple
57+
AZURE_SEARCH_PERMITTED_GROUPS_COLUMN=
58+
AZURE_SEARCH_STRICTNESS=3
59+
# Chat with data: Azure CosmosDB Mongo VCore
60+
AZURE_COSMOSDB_MONGO_VCORE_CONNECTION_STRING=
61+
AZURE_COSMOSDB_MONGO_VCORE_DATABASE=
62+
AZURE_COSMOSDB_MONGO_VCORE_CONTAINER=
63+
AZURE_COSMOSDB_MONGO_VCORE_INDEX=
64+
AZURE_COSMOSDB_MONGO_VCORE_INDEX=
65+
AZURE_COSMOSDB_MONGO_VCORE_TOP_K=
66+
AZURE_COSMOSDB_MONGO_VCORE_STRICTNESS=
67+
AZURE_COSMOSDB_MONGO_VCORE_ENABLE_IN_DOMAIN=
68+
AZURE_COSMOSDB_MONGO_VCORE_CONTENT_COLUMNS=
69+
AZURE_COSMOSDB_MONGO_VCORE_FILENAME_COLUMN=
70+
AZURE_COSMOSDB_MONGO_VCORE_TITLE_COLUMN=
71+
AZURE_COSMOSDB_MONGO_VCORE_URL_COLUMN=
72+
AZURE_COSMOSDB_MONGO_VCORE_VECTOR_COLUMNS=
73+
# Chat with data: Elasticsearch
74+
ELASTICSEARCH_ENDPOINT=
75+
ELASTICSEARCH_ENCODED_API_KEY=
76+
ELASTICSEARCH_INDEX=
77+
ELASTICSEARCH_QUERY_TYPE=
78+
ELASTICSEARCH_TOP_K=
79+
ELASTICSEARCH_ENABLE_IN_DOMAIN=
80+
ELASTICSEARCH_CONTENT_COLUMNS=
81+
ELASTICSEARCH_FILENAME_COLUMN=
82+
ELASTICSEARCH_TITLE_COLUMN=
83+
ELASTICSEARCH_URL_COLUMN=
84+
ELASTICSEARCH_VECTOR_COLUMNS=
85+
ELASTICSEARCH_STRICTNESS=
86+
ELASTICSEARCH_EMBEDDING_MODEL_ID=
87+
# Chat with data: Pinecone
88+
PINECONE_ENVIRONMENT=
89+
PINECONE_API_KEY=
90+
PINECONE_INDEX_NAME=
91+
PINECONE_TOP_K=
92+
PINECONE_STRICTNESS=
93+
PINECONE_ENABLE_IN_DOMAIN=
94+
PINECONE_CONTENT_COLUMNS=
95+
PINECONE_FILENAME_COLUMN=
96+
PINECONE_TITLE_COLUMN=
97+
PINECONE_URL_COLUMN=
98+
PINECONE_VECTOR_COLUMNS=
99+
# Chat with data: Azure Machine Learning MLIndex
100+
AZURE_MLINDEX_NAME=
101+
AZURE_MLINDEX_VERSION=
102+
AZURE_ML_PROJECT_RESOURCE_ID=
103+
AZURE_MLINDEX_TOP_K=
104+
AZURE_MLINDEX_STRICTNESS=
105+
AZURE_MLINDEX_ENABLE_IN_DOMAIN=
106+
AZURE_MLINDEX_CONTENT_COLUMNS=
107+
AZURE_MLINDEX_FILENAME_COLUMN=
108+
AZURE_MLINDEX_TITLE_COLUMN=
109+
AZURE_MLINDEX_URL_COLUMN=
110+
AZURE_MLINDEX_VECTOR_COLUMNS=
111+
AZURE_MLINDEX_QUERY_TYPE=
112+
# Chat with data: Prompt flow API
113+
USE_PROMPTFLOW=False
114+
PROMPTFLOW_ENDPOINT=
115+
PROMPTFLOW_API_KEY=
116+
PROMPTFLOW_RESPONSE_TIMEOUT=120
117+
PROMPTFLOW_REQUEST_FIELD_NAME=query
118+
PROMPTFLOW_RESPONSE_FIELD_NAME=reply
119+
PROMPTFLOW_CITATIONS_FIELD_NAME=documents

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
*.{cmd,[cC][mM][dD]} text eol=crlf
3+
*.{bat,[bB][aA][tT]} text eol=crlf

.github/ISSUE_TEMPLATE/bug_report.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Configuration: Please provide the following**
27+
- Azure OpenAI model name and version (e.g. 'gpt-35-turbo-16k, version 0613')
28+
- Is chat history enabled?
29+
- Are you using data? If so, what data source? (e.g. Azure AI Search, Azure CosmosDB Mongo vCore, etc)
30+
31+
**Additional context**
32+
Add any other context about the problem here.
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to this sample app, or to an Azure service, such as Azure OpenAI or Azure AI Search?**
11+
Describe the scope of your request. This forum is focused on features relating to this sample app and its functionality, not the functionality of underlying Azure services.
12+
13+
**Is your feature request related to a problem? Please describe.**
14+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
15+
16+
**Describe the solution you'd like**
17+
A clear and concise description of what you want to happen.
18+
19+
**Is this feature specific to your use case or your organization, or would it apply broadly across other uses of this app?**
20+
Describe how you and others might leverage this feature.
21+
22+
**Describe alternatives you've considered**
23+
A clear and concise description of any alternative solutions or features you've considered.
24+
25+
**Additional context**
26+
Add any other context or screenshots about the feature request here.

.github/acl/access.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Documentation for ACL policy: https://aka.ms/gim/docs/policy/acl
2+
3+
name: Access control list
4+
description: List of teams and their permission levels
5+
resource: repository
6+
where:
7+
configuration:
8+
manageAccess:
9+
- team: csactoengineering
10+
role: Maintain

.github/compliance/inventory.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
inventory:
2+
- source: ServiceTree
3+
items:
4+
- id: a9bcb401-8662-46a7-82e0-6fa1ae1cecaa
5+
isProduction: false

.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/policies/jit.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Documentation for JIT policy: https://aka.ms/gim/docs/policy/jit
2+
3+
# metadata
4+
id: id
5+
name: JIT_Access
6+
description: Policy for admin JIT for repos in this org
7+
8+
# filters
9+
resource: repository
10+
11+
# primitive configuration
12+
configuration:
13+
jitAccess:
14+
enabled: true
15+
maxHours: 2
16+
approvers:
17+
role: Maintain
18+
requestors:
19+
role: Write

.github/pull_request_template.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### Motivation and Context
2+
3+
<!-- Thank you for your contribution to this repo!
4+
Please help reviewers and future users, providing the following information:
5+
1. Why is this change required?
6+
2. What problem does it solve?
7+
3. What scenario does it contribute to?
8+
4. If it fixes an open issue, please link to the issue here.
9+
5. Does this solve an issue or add a feature that *all* users of this sample app can benefit from? Contributions will only be accepted that apply across all users of this app.
10+
-->
11+
12+
### Description
13+
14+
<!-- Describe your changes, the overall approach, the underlying design.
15+
These notes will help understanding how your code works. Thanks! -->
16+
17+
18+
### Contribution Checklist
19+
20+
<!-- Before submitting this PR, please make sure: -->
21+
22+
- [ ] I have built and tested the code locally and in a deployed app
23+
- [ ] For frontend changes, I have pulled the latest code from main, built the frontend, and committed all static files.
24+
- [ ] This is a change for all users of this app. No code or asset is specific to my use case or my organization.
25+
- [ ] I didn't break any existing functionality :smile:

.github/workflows/node.js.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Build Frontend
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: frontend
19+
strategy:
20+
matrix:
21+
node-version: [14.x, 16.x, 18.x, 21.x]
22+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: 'npm'
31+
cache-dependency-path: '**/package-lock.json'
32+
- run: npm ci
33+
- run: NODE_OPTIONS=--max_old_space_size=8192 npm run build --if-present
34+
- run: npm run test --if-present

.github/workflows/python-app.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python application
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
test_linux:
17+
runs-on:
18+
- ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Set up Python 3.11
22+
uses: actions/setup-python@v3
23+
with:
24+
python-version: "3.11"
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -r requirements-dev.txt
29+
- name: Test with pytest
30+
run: |
31+
export PYTHONPATH=$(pwd)
32+
pytest -v --show-capture=stdout -k "not integration"
33+
34+
test_windows:
35+
runs-on:
36+
- windows-latest
37+
steps:
38+
- uses: actions/checkout@v3
39+
- name: Set up Python 3.11
40+
uses: actions/setup-python@v3
41+
with:
42+
python-version: "3.11"
43+
- name: Install dependencies
44+
run: |
45+
python -m pip install --upgrade pip
46+
pip install -r requirements-dev.txt
47+
- name: Test with pytest
48+
run: |
49+
$env:PYTHONPATH=$pwd
50+
pytest -v --show-capture=stdout -k "not integration"

0 commit comments

Comments
 (0)