Skip to content

Commit

Permalink
setup repos with most recent version of project
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewldesousa committed Jul 8, 2024
1 parent da67634 commit cbd5fd4
Show file tree
Hide file tree
Showing 159 changed files with 42,412 additions and 30 deletions.
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Azure Developer CLI",
"image": "mcr.microsoft.com/devcontainers/python:3.10",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "16",
"nodeGypDependencies": false
},
"ghcr.io/devcontainers/features/azure-cli:1.0.8": {},
"ghcr.io/azure/azure-dev/azd:latest": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.azure-dev",
"ms-azuretools.vscode-bicep",
"ms-python.python"
]
},
"codespaces": {
"openFiles": [
"README.md"
]
}
},
"forwardPorts": [
5000
],
"remoteUser": "vscode",
"hostRequirements": {
"memory": "8gb"
}
}
119 changes: 119 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Chat
DEBUG=True
AZURE_OPENAI_RESOURCE=
AZURE_OPENAI_MODEL=
AZURE_OPENAI_KEY=
AZURE_OPENAI_MODEL_NAME=gpt-35-turbo-16k
AZURE_OPENAI_TEMPERATURE=0
AZURE_OPENAI_TOP_P=1.0
AZURE_OPENAI_MAX_TOKENS=1000
AZURE_OPENAI_STOP_SEQUENCE=
AZURE_OPENAI_SEED=
AZURE_OPENAI_CHOICES_COUNT=1
AZURE_OPENAI_PRESENCE_PENALTY=0.0
AZURE_OPENAI_FREQUENCY_PENALTY=0.0
AZURE_OPENAI_LOGIT_BIAS=
AZURE_OPENAI_USER=
AZURE_OPENAI_TOOLS=
AZURE_OPENAI_TOOL_CHOICE=
AZURE_OPENAI_SYSTEM_MESSAGE=You are an AI assistant that helps people find information.
AZURE_OPENAI_PREVIEW_API_VERSION=2024-05-01-preview
AZURE_OPENAI_STREAM=True
AZURE_OPENAI_ENDPOINT=
AZURE_OPENAI_EMBEDDING_NAME=
AZURE_OPENAI_EMBEDDING_ENDPOINT=
AZURE_OPENAI_EMBEDDING_KEY=
# User Interface
UI_TITLE=
UI_LOGO=
UI_CHAT_LOGO=
UI_CHAT_TITLE=
UI_CHAT_DESCRIPTION=
UI_FAVICON=
# Chat history
AZURE_COSMOSDB_ACCOUNT=
AZURE_COSMOSDB_DATABASE=db_conversation_history
AZURE_COSMOSDB_CONVERSATIONS_CONTAINER=conversations
AZURE_COSMOSDB_ACCOUNT_KEY=
AZURE_COSMOSDB_ENABLE_FEEDBACK=False
# Chat with data: common settings
SEARCH_TOP_K=5
SEARCH_STRICTNESS=3
SEARCH_ENABLE_IN_DOMAIN=True
# Chat with data: Azure AI Search
AZURE_SEARCH_SERVICE=
AZURE_SEARCH_INDEX=
AZURE_SEARCH_KEY=
AZURE_SEARCH_SEMANTIC_SEARCH_CONFIG=
AZURE_SEARCH_INDEX_IS_PRECHUNKED=False
AZURE_SEARCH_TOP_K=5
AZURE_SEARCH_ENABLE_IN_DOMAIN=False
AZURE_SEARCH_CONTENT_COLUMNS=
AZURE_SEARCH_FILENAME_COLUMN=
AZURE_SEARCH_TITLE_COLUMN=
AZURE_SEARCH_URL_COLUMN=
AZURE_SEARCH_VECTOR_COLUMNS=
AZURE_SEARCH_QUERY_TYPE=simple
AZURE_SEARCH_PERMITTED_GROUPS_COLUMN=
AZURE_SEARCH_STRICTNESS=3
# Chat with data: Azure CosmosDB Mongo VCore
AZURE_COSMOSDB_MONGO_VCORE_CONNECTION_STRING=
AZURE_COSMOSDB_MONGO_VCORE_DATABASE=
AZURE_COSMOSDB_MONGO_VCORE_CONTAINER=
AZURE_COSMOSDB_MONGO_VCORE_INDEX=
AZURE_COSMOSDB_MONGO_VCORE_INDEX=
AZURE_COSMOSDB_MONGO_VCORE_TOP_K=
AZURE_COSMOSDB_MONGO_VCORE_STRICTNESS=
AZURE_COSMOSDB_MONGO_VCORE_ENABLE_IN_DOMAIN=
AZURE_COSMOSDB_MONGO_VCORE_CONTENT_COLUMNS=
AZURE_COSMOSDB_MONGO_VCORE_FILENAME_COLUMN=
AZURE_COSMOSDB_MONGO_VCORE_TITLE_COLUMN=
AZURE_COSMOSDB_MONGO_VCORE_URL_COLUMN=
AZURE_COSMOSDB_MONGO_VCORE_VECTOR_COLUMNS=
# Chat with data: Elasticsearch
ELASTICSEARCH_ENDPOINT=
ELASTICSEARCH_ENCODED_API_KEY=
ELASTICSEARCH_INDEX=
ELASTICSEARCH_QUERY_TYPE=
ELASTICSEARCH_TOP_K=
ELASTICSEARCH_ENABLE_IN_DOMAIN=
ELASTICSEARCH_CONTENT_COLUMNS=
ELASTICSEARCH_FILENAME_COLUMN=
ELASTICSEARCH_TITLE_COLUMN=
ELASTICSEARCH_URL_COLUMN=
ELASTICSEARCH_VECTOR_COLUMNS=
ELASTICSEARCH_STRICTNESS=
ELASTICSEARCH_EMBEDDING_MODEL_ID=
# Chat with data: Pinecone
PINECONE_ENVIRONMENT=
PINECONE_API_KEY=
PINECONE_INDEX_NAME=
PINECONE_TOP_K=
PINECONE_STRICTNESS=
PINECONE_ENABLE_IN_DOMAIN=
PINECONE_CONTENT_COLUMNS=
PINECONE_FILENAME_COLUMN=
PINECONE_TITLE_COLUMN=
PINECONE_URL_COLUMN=
PINECONE_VECTOR_COLUMNS=
# Chat with data: Azure Machine Learning MLIndex
AZURE_MLINDEX_NAME=
AZURE_MLINDEX_VERSION=
AZURE_ML_PROJECT_RESOURCE_ID=
AZURE_MLINDEX_TOP_K=
AZURE_MLINDEX_STRICTNESS=
AZURE_MLINDEX_ENABLE_IN_DOMAIN=
AZURE_MLINDEX_CONTENT_COLUMNS=
AZURE_MLINDEX_FILENAME_COLUMN=
AZURE_MLINDEX_TITLE_COLUMN=
AZURE_MLINDEX_URL_COLUMN=
AZURE_MLINDEX_VECTOR_COLUMNS=
AZURE_MLINDEX_QUERY_TYPE=
# Chat with data: Prompt flow API
USE_PROMPTFLOW=False
PROMPTFLOW_ENDPOINT=
PROMPTFLOW_API_KEY=
PROMPTFLOW_RESPONSE_TIMEOUT=120
PROMPTFLOW_REQUEST_FIELD_NAME=query
PROMPTFLOW_RESPONSE_FIELD_NAME=reply
PROMPTFLOW_CITATIONS_FIELD_NAME=documents
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Configuration: Please provide the following**
- Azure OpenAI model name and version (e.g. 'gpt-35-turbo-16k, version 0613')
- Is chat history enabled?
- Are you using data? If so, what data source? (e.g. Azure AI Search, Azure CosmosDB Mongo vCore, etc)

**Additional context**
Add any other context about the problem here.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to this sample app, or to an Azure service, such as Azure OpenAI or Azure AI Search?**
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.

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Is this feature specific to your use case or your organization, or would it apply broadly across other uses of this app?**
Describe how you and others might leverage this feature.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/acl/access.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Documentation for ACL policy: https://aka.ms/gim/docs/policy/acl

name: Access control list
description: List of teams and their permission levels
resource: repository
where:
configuration:
manageAccess:
- team: csactoengineering
role: Maintain
5 changes: 5 additions & 0 deletions .github/compliance/inventory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
inventory:
- source: ServiceTree
items:
- id: a9bcb401-8662-46a7-82e0-6fa1ae1cecaa
isProduction: false
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
19 changes: 19 additions & 0 deletions .github/policies/jit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Documentation for JIT policy: https://aka.ms/gim/docs/policy/jit

# metadata
id: id
name: JIT_Access
description: Policy for admin JIT for repos in this org

# filters
resource: repository

# primitive configuration
configuration:
jitAccess:
enabled: true
maxHours: 2
approvers:
role: Maintain
requestors:
role: Write
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### Motivation and Context

<!-- Thank you for your contribution to this repo!
Please help reviewers and future users, providing the following information:
1. Why is this change required?
2. What problem does it solve?
3. What scenario does it contribute to?
4. If it fixes an open issue, please link to the issue here.
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.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->


### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] I have built and tested the code locally and in a deployed app
- [ ] For frontend changes, I have pulled the latest code from main, built the frontend, and committed all static files.
- [ ] This is a change for all users of this app. No code or asset is specific to my use case or my organization.
- [ ] I didn't break any existing functionality :smile:
34 changes: 34 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Build Frontend

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]


jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- run: NODE_OPTIONS=--max_old_space_size=8192 npm run build --if-present
- run: npm run test --if-present
50 changes: 50 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
test_linux:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Test with pytest
run: |
export PYTHONPATH=$(pwd)
pytest -v --show-capture=stdout -k "not integration"
test_windows:
runs-on:
- windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Test with pytest
run: |
$env:PYTHONPATH=$pwd
pytest -v --show-capture=stdout -k "not integration"
Loading

0 comments on commit cbd5fd4

Please sign in to comment.