Skip to content

Commit 4a628b7

Browse files
ready solution
0 parents  commit 4a628b7

File tree

217 files changed

+35009
-0
lines changed

Some content is hidden

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

217 files changed

+35009
-0
lines changed

.dockerignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*.pyd
5+
6+
# Caches of various types
7+
.cache/
8+
.pip/
9+
10+
# Development environments
11+
.env
12+
.venv/
13+
venv/
14+
ENV/
15+
16+
# Version control
17+
.git/
18+
.gitignore
19+
.github/
20+
21+
# Unit test / coverage reports
22+
htmlcov/
23+
.tox/
24+
.coverage
25+
.cache
26+
nosetests.xml
27+
coverage.xml
28+
*.cover
29+
.hypothesis/
30+
.pytest_cache/
31+
32+
# Project backups
33+
*.bak
34+
35+
# Log files
36+
*.log
37+
38+
# OS generated files
39+
.DS_Store
40+
Thumbs.db
41+
42+
# Editor directories and files
43+
.idea/
44+
.vscode/
45+
*.swp
46+
*.swo

.env.sample

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# This env file is a sample file. Please create a new file named '.env' and copy the contents of this file into the new file.
2+
# Fill in the values for the variables below.
3+
# IMPORTANT: Do not commit the .env file to the repository. Add it to the .gitignore file to prevent it from being committed.
4+
# The env file should be compatible wih the python-dotenv library and bash shell.
5+
# That means that:
6+
# -no spaces around the '=' sign
7+
# -no single quotes around the values
8+
# -no spaces around the values
9+
# -no spaces around the variable names
10+
API_BASE_URL=http://localhost:9000
11+
## Azure Machine Learning
12+
AML_SUBSCRIPTION_ID=
13+
AML_RESOURCE_GROUP=
14+
AML_WORKSPACE_NAME=
15+
AML_PASSWORD="<password of the AML service principal>"
16+
AML_TENANT_ID="<tenant id where the sp has been created>"
17+
AML_SERVICE_PRINCIPAL_ID="<service principal id of the AML>"
18+
# Azure Storage File Share
19+
AZURE_FILE_SHARE_ACCOUNT=
20+
AZURE_FILE_SHARE_NAME="research-copilot-storage"
21+
AZURE_FILE_SHARE_KEY=
22+
23+
### Text Chunking Settings
24+
TEXT_CHUNK_SIZE=512
25+
TEXT_CHUNK_OVERLAP=128
26+
27+
# Azure OpenAI Model Names - Make sure the deployed models have the same names as below
28+
AZURE_OPENAI_MODEL=gpt-4o
29+
AZURE_OPENAI_EMBEDDING_MODEL=text-embedding-ada-002
30+
AZURE_OPENAI_MODEL_VISION=gpt-4o
31+
32+
33+
# Azure OpenAI Resource for Embedding Model
34+
AZURE_OPENAI_EMBEDDING_MODEL_RESOURCE=
35+
AZURE_OPENAI_EMBEDDING_MODEL_RESOURCE_KEY=
36+
AZURE_OPENAI_EMBEDDING_MODEL_API_VERSION=2023-12-01-preview
37+
38+
39+
# Azure OpenAI Principal Resource and Key for GPT-4-Turbo and GPT-4-Vision
40+
### NOTE: In every AOAI resource, there needs to be 2 models deployed: GPT-4-Turbo named 'gpt-4', and GPT-4 Vision named `gpt4v'
41+
AZURE_OPENAI_RESOURCE=""
42+
AZURE_OPENAI_KEY=""
43+
44+
45+
# Additional Azure OpenAI Resources for multi-threaded Ingestion
46+
### NOTE: In every AOAI resource, there needs to be 2 models deployed: GPT-4-Turbo named 'gpt-4', and GPT-4 Vision named `gpt4v'
47+
AZURE_OPENAI_RESOURCE_1=
48+
AZURE_OPENAI_KEY_1=
49+
50+
AZURE_OPENAI_RESOURCE_2=
51+
AZURE_OPENAI_KEY_2=
52+
53+
AZURE_OPENAI_RESOURCE_3=
54+
AZURE_OPENAI_KEY_3=
55+
56+
AZURE_OPENAI_RESOURCE_4=
57+
AZURE_OPENAI_KEY_4=
58+
59+
AZURE_OPENAI_RESOURCE_5=
60+
AZURE_OPENAI_KEY_5=
61+
62+
AZURE_OPENAI_RESOURCE_6=
63+
AZURE_OPENAI_KEY_6=
64+
65+
AZURE_OPENAI_RESOURCE_7=
66+
AZURE_OPENAI_KEY_7=
67+
68+
AZURE_OPENAI_RESOURCE_8=
69+
AZURE_OPENAI_KEY_8=
70+
71+
72+
73+
# Azure OpenAI Parameters
74+
AZURE_OPENAI_API_VERSION="2024-05-01-preview"
75+
AZURE_OPENAI_EMBEDDING_MODEL_API_VERSION="2023-12-01-preview"
76+
AZURE_OPENAI_TEMPERATURE=0
77+
AZURE_OPENAI_TOP_P=1.0
78+
AZURE_OPENAI_MAX_TOKENS=1000
79+
AZURE_OPENAI_STOP_SEQUENCE=
80+
81+
# Root Path for Ingestion folders
82+
ROOT_PATH_INGESTION="../"
83+
84+
85+
# Azure Vision Resource and Key
86+
AZURE_VISION_ENDPOINT=""
87+
AZURE_VISION_KEY=""
88+
89+
90+
# Azure Cognitive Search Endpoint and Key
91+
COG_SEARCH_ENDPOINT=
92+
COG_SEARCH_ADMIN_KEY=
93+
COG_VEC_SEARCH_API_VERSION='2023-11-01'
94+
INITIAL_INDEX=
95+
96+
97+
## Azure Machine Learning
98+
AML_SUBSCRIPTION_ID=
99+
AML_RESOURCE_GROUP=
100+
AML_WORKSPACE_NAME=
101+
AML_PASSWORD=
102+
AML_SERVICE_PRINCIPAL_ID=
103+
AML_TENANT_ID=
104+
AML_VMSIZE=
105+
106+
# Azure Storage File Share
107+
AZURE_FILE_SHARE_ACCOUNT=
108+
AZURE_FILE_SHARE_NAME='research-copilot-storage'
109+
AZURE_FILE_SHARE_KEY=
110+
111+
# Document Intelligence Resource
112+
## Public preview version 2024-02-29-preview is currently ONLY available in the following Azure regions:
113+
## East US, West US2, West Europe
114+
DI_ENDPOINT=""
115+
DI_KEY=""
116+
DI_API_VERSION="2024-02-29-preview"
117+
118+
119+
120+
## PYTHON SETTINGS
121+
PYTHONPATH=./code/:../code:../TaskWeaver:./code/utils:../code/utils:../../code:../../code/utils
122+
123+
124+
## Default values for the Deployment Script
125+
SUBSCRIPTION=
126+
RG_WEBAPP_NAME=
127+
128+
129+
#COSMOS DB
130+
COSMOS_URI=
131+
COSMOS_KEY=
132+
COSMOS_DB_NAME=
133+
COSMOS_CONTAINER_NAME=prompts
134+
COSMOS_CATEGORYID=prompts
135+
COSMOS_LOG_CONTAINER= logs
136+
137+
138+
139+
# Azure Speech Service
140+
SPEECH_APIKEY=
141+
SPEECH_REGION=
142+
SPEECH_LANGUAGE=en-US
143+
# Whisper Service
144+
AZURE_OPENAI_MODEL_WHISPER=
145+
AZURE_OPENAI_ENDPOINT_WHISPER=
146+
AZURE_OPENAI_VERSION_WHISPER=
147+
148+
############################################
149+
##### BELOW ARE OPTIONAL OR NOT USED FOR NOW
150+
############################################
151+
152+
153+
# Azure Cognitive Search Endpoints (optional) for copying and cloning indexes
154+
COG_SEARCH_ENDPOINT_PROD=
155+
COG_SEARCH_ADMIN_KEY_PROD=
156+
157+
# Azure Blob Storage Connection - Not used for now
158+
BLOB_CONN_STR=""
159+
160+
# Azure Cognitive Service Endpoint and Key - Not used for now
161+
COG_SERV_ENDPOINT=""
162+
COG_SERV_KEY=""
163+
COG_SERV_LOCATION="westeurope"
164+
165+
#CHAINLIT_APP
166+
CHAINLIT_APP=
167+
168+

.github/CODE_OF_CONDUCT.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Microsoft Open Source Code of Conduct
2+
3+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4+
5+
Resources:
6+
7+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9+
- Contact [[email protected]](mailto:[email protected]) with questions or concerns

.github/ISSUE_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!--
2+
IF SUFFICIENT INFORMATION IS NOT PROVIDED VIA THE FOLLOWING TEMPLATE THE ISSUE MIGHT BE CLOSED WITHOUT FURTHER CONSIDERATION OR INVESTIGATION
3+
-->
4+
> Please provide us with the following information:
5+
> ---------------------------------------------------------------
6+
7+
### This issue is for a: (mark with an `x`)
8+
```
9+
- [ ] bug report -> please search issues before submitting
10+
- [ ] feature request
11+
- [ ] documentation issue or request
12+
- [ ] regression (a behavior that used to work and stopped in a new release)
13+
```
14+
15+
### Minimal steps to reproduce
16+
>
17+
18+
### Any log messages given by the failure
19+
>
20+
21+
### Expected/desired behavior
22+
>
23+
24+
### OS and Version?
25+
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
26+
27+
### Versions
28+
>
29+
30+
### Mention any other details that might be useful
31+
32+
> ---------------------------------------------------------------
33+
> Thanks! We'll be in touch soon.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## Purpose
2+
<!-- Describe the intention of the changes being proposed. What problem does it solve or functionality does it add? -->
3+
* ...
4+
5+
## Does this introduce a breaking change?
6+
<!-- Mark one with an "x". -->
7+
```
8+
[ ] Yes
9+
[ ] No
10+
```
11+
12+
## Pull Request Type
13+
What kind of change does this Pull Request introduce?
14+
15+
<!-- Please check the one that applies to this PR using "x". -->
16+
```
17+
[ ] Bugfix
18+
[ ] Feature
19+
[ ] Code style update (formatting, local variables)
20+
[ ] Refactoring (no functional changes, no api changes)
21+
[ ] Documentation content changes
22+
[ ] Other... Please describe:
23+
```
24+
25+
## How to Test
26+
* Get the code
27+
28+
```
29+
git clone [repo-address]
30+
cd [repo-name]
31+
git checkout [branch-name]
32+
npm install
33+
```
34+
35+
* Test the code
36+
<!-- Add steps to run the tests suite and/or manually test -->
37+
```
38+
```
39+
40+
## What to Check
41+
Verify that the following are valid
42+
* ...
43+
44+
## Other Information
45+
<!-- Add any other helpful information that may be needed here. -->

0 commit comments

Comments
 (0)