Skip to content

Commit a15ecf4

Browse files
authored
Merge pull request #146 from microsoft/km-v3-staging
feat: CKM v3 release
2 parents 706cd28 + 3c31b23 commit a15ecf4

File tree

268 files changed

+40727
-22665
lines changed

Some content is hidden

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

268 files changed

+40727
-22665
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*.zip filter=lfs diff=lfs merge=lfs -text
1+

App/.env.sample

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
AZURE_OPENAI_ENDPOINT=
2+
AZURE_OPENAI_API_KEY=
3+
AZURE_OPENAI_DEPLOYMENT_NAME=
4+
AZURE_OPENAI_API_VERSION=
5+
AZURE_OPENAI_RESOURCE=
6+
AZURE_OPENAI_PREVIEW_API_VERSION=
7+
8+
USE_GRAPHRAG=False
9+
GRAPHRAG_URL=
10+
RAG_URL=
11+
USE_CHAT_HISTORY_ENABLED=True
12+
13+
AZURE_COSMOSDB_ACCOUNT=
14+
AZURE_COSMOSDB_ACCOUNT_KEY=
15+
AZURE_COSMOSDB_CONVERSATIONS_CONTAINER=conversations
16+
AZURE_COSMOSDB_DATABASE=db_conversation_history
17+
AZURE_COSMOSDB_ENABLE_FEEDBACK=True
18+
19+
CHART_DASHBOARD_URL=
20+
CHART_DASHBOARD_FILTERS_URL=
21+
REACT_APP_LAYOUT_CONFIG='{
22+
"appConfig": {
23+
"THREE_COLUMN": {
24+
"DASHBOARD": 50,
25+
"CHAT": 33,
26+
"CHATHISTORY": 17
27+
},
28+
"TWO_COLUMN": {
29+
"DASHBOARD_CHAT": {
30+
"DASHBOARD": 65,
31+
"CHAT": 35
32+
},
33+
"CHAT_CHATHISTORY": {
34+
"CHAT": 80,
35+
"CHATHISTORY": 20
36+
}
37+
}
38+
},
39+
"charts": [
40+
{
41+
"id": "SATISFIED",
42+
"name": "Satisfied",
43+
"type": "card",
44+
"layout": { "row": 1, "column": 1, "height": 11 }
45+
},
46+
{
47+
"id": "TOTAL_CALLS",
48+
"name": "Total Calls",
49+
"type": "card",
50+
"layout": { "row": 1, "column": 2}
51+
},
52+
{
53+
"id": "AVG_HANDLING_TIME",
54+
"name": "Average Handling Time",
55+
"type": "card",
56+
"layout": { "row": 1, "column": 3 }
57+
},
58+
{
59+
"id": "SENTIMENT",
60+
"name": "Topics Overview",
61+
"type": "donutchart",
62+
"layout": { "row": 2, "column": 1, "width": 40, "height": 44.5 }
63+
},
64+
{
65+
"id": "AVG_HANDLING_TIME_BY_TOPIC",
66+
"name": "Average Handling Time By Topic",
67+
"type": "bar",
68+
"layout": { "row": 2, "column": 2, "width": 60 }
69+
},
70+
{
71+
"id": "TOPICS",
72+
"name": "Trending Topics",
73+
"type": "table",
74+
"layout": { "row": 3, "column": 1}
75+
},
76+
{
77+
"id": "KEY_PHRASES",
78+
"name": "Key Phrases",
79+
"type": "wordcloud",
80+
"layout": { "row": 3, "column": 2, "height": 44.5 }
81+
}
82+
]
83+
}
84+
'

App/.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
max-line-length = 88
3+
extend-ignore = E501, E203
4+
exclude = .venv, frontend,

App/.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# TeamsFx files
2+
env/.env.*.user
3+
env/.env.local
4+
.localConfigs
5+
appPackage/build
6+
7+
# dependencies
8+
node_modules/
9+
/node_modules
10+
App/frontend/node_modules
11+
App/.venv/
12+
13+
# misc
14+
.env
15+
.venv/
16+
.deployment
17+
.DS_Store
18+
19+
# build
20+
lib/
21+
/lib
22+
/build
23+
24+
.venv
25+
frontend/node_modules
26+
.env
27+
# static
28+
.azure/
29+
__pycache__/
30+
.ipynb_checkpoints/

App/WebApp.Dockerfile

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Stage 1: Build frontend
2+
FROM node:20-alpine AS frontend
3+
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
4+
5+
WORKDIR /home/node/app
6+
7+
# Install dependencies
8+
COPY ./frontend/package*.json ./
9+
USER node
10+
RUN npm ci
11+
12+
# Copy source code and build
13+
COPY --chown=node:node ./frontend/ ./frontend
14+
WORKDIR /home/node/app/frontend
15+
RUN npm run build
16+
17+
# Stage 2: Build backend with static files
18+
FROM python:3.11-alpine
19+
20+
# Install dependencies
21+
RUN apk add --no-cache --virtual .build-deps \
22+
build-base \
23+
libffi-dev \
24+
openssl-dev \
25+
curl \
26+
&& apk add --no-cache \
27+
libpq
28+
29+
COPY requirements.txt /usr/src/app/
30+
RUN pip install --no-cache-dir -r /usr/src/app/requirements.txt \
31+
&& rm -rf /root/.cache
32+
33+
# Copy backend source code
34+
COPY . /usr/src/app/
35+
36+
# Copy static files from the frontend stage to the backend
37+
COPY --from=frontend /home/node/app/frontend/build/static /usr/src/app/static/
38+
39+
# Set working directory and expose port
40+
WORKDIR /usr/src/app
41+
EXPOSE 80
42+
43+
# Start application
44+
CMD ["gunicorn", "-b", "0.0.0.0:80", "app:app"]

App/WebApp.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.venv
2+
.env
3+
WebApp.Dockerfile
4+
WebApp.dockerignore
5+
frontend/node_modules

0 commit comments

Comments
 (0)