Skip to content

fix: merging dev changes to main branch #1629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 61 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
2dbb0b1
ci: Updated workflow to handle main, dev and demo branch | Dependabot…
Roopan-Microsoft Nov 25, 2024
97ced9f
fix: SFI Fixes & scope reverted to subscription (#1513)
Roopan-Microsoft Nov 25, 2024
903c259
ci: workflow updated for build docker (#1514)
Roopan-Microsoft Nov 25, 2024
4cf2972
ci: build docker updated for dev (#1522)
Roopan-Microsoft Nov 25, 2024
9158819
ci: workflow branch code updated (#1525)
Roopan-Microsoft Nov 25, 2024
4545a48
updated comment
AjitPadhi-Microsoft Nov 25, 2024
84a33b5
updated workflow
AjitPadhi-Microsoft Nov 25, 2024
f8c1c8f
updated workflow
AjitPadhi-Microsoft Nov 25, 2024
e31a661
updated workflow
AjitPadhi-Microsoft Nov 26, 2024
847ce7e
updated bicep for registry
AjitPadhi-Microsoft Nov 26, 2024
8f8cc98
fixed bicep
AjitPadhi-Microsoft Nov 26, 2024
15b948c
fix: bicep updated (#1527)
AjitPadhi-Microsoft Nov 26, 2024
1645e43
Merge branch 'main' into dev
Roopan-Microsoft Nov 27, 2024
8df387a
Merge branch 'dev' of https://github.com/Azure-Samples/chat-with-your…
Roopan-Microsoft Nov 27, 2024
e4dd5f2
fix: Container issue fix for multiple branch (#1539)
AjitPadhi-Microsoft Nov 27, 2024
88d06dc
fix: Updated workflow (#1540)
AjitPadhi-Microsoft Nov 27, 2024
e5cf4dd
ci: Psl container fix for checkout code from head branch (#1541)
Roopan-Microsoft Nov 27, 2024
02d0056
fix: multiple container tag issue fix (#1552)
AjitPadhi-Microsoft Dec 9, 2024
90e1040
fix: Workflow issue fix on docker image (#1554)
AjitPadhi-Microsoft Dec 9, 2024
8a5a1cb
fix: Downmerge dev (#1566)
Pavan-Microsoft Dec 18, 2024
131c323
fix: CWYD Citation Links to Documents Break After Specific Timeframe …
Harmanpreet-Microsoft Dec 18, 2024
93b84ed
fix: Commit changes bug (#1568)
UtkarshMishra-Microsoft Dec 18, 2024
0875b92
fix: Post-Deployment Script for Managing Bicep Outputs in .env File …
Pavan-Microsoft Dec 19, 2024
76190b3
fix: import error in env_helper.py (#1571)
Pavan-Microsoft Dec 19, 2024
c65bf01
fix: add conversation flow in environment variable for adminweb app (…
Priyanka-Microsoft Dec 19, 2024
1f326d9
fix: Update Hosting Model Configuration in ARM/Bicep Template (#1570)
Prasanjeet-Microsoft Dec 19, 2024
fc688c2
fix: Update main.json for changes conversation flow changes in bicep …
Priyanka-Microsoft Dec 19, 2024
56adb59
Merge branch 'main' into dev
Roopan-Microsoft Dec 24, 2024
afaabdc
build: Dependabotchanges merge to Dev branch (#1602)
Roopan-Microsoft Dec 30, 2024
03f52b3
feat: Configurable System Prompts for Flexibility and Maintenance - C…
Pavan-Microsoft Dec 31, 2024
e92eba1
fix: Add Missing Logs (#1609)
Pavan-Microsoft Jan 2, 2025
b0860ee
commented the prompt flow in azure yaml file
Roopan-Microsoft Jan 3, 2025
983b1f7
Merge branches 'dev' and 'dev' of https://github.com/Azure-Samples/ch…
Roopan-Microsoft Jan 3, 2025
dae4043
Add execute permissions parse_env.sh in postprovision hook
Pavan-Microsoft Jan 3, 2025
08ad207
fix: Build issue with docker
Prajwal-Microsoft Jan 4, 2025
c49ddfd
Update build-docker.yml
Prajwal-Microsoft Jan 5, 2025
5994f99
fix: Docker file failure issue
Prajwal-Microsoft Jan 5, 2025
dc7b87c
fix: Response getting ']' brackets, it's inconsistent (#1611)
AjitPadhi-Microsoft Jan 6, 2025
2d1af79
fix: Fix Duplication of Flattened JSON Keys in .env File During Multi…
Pavan-Microsoft Jan 7, 2025
c553312
fix: Role Duplication Error in azd up Command for PostgreSQL (#1621)
Pavan-Microsoft Jan 10, 2025
8213f0a
Merge branch 'main' into dev
Roopan-Microsoft Jan 10, 2025
1f22786
feat: Remove AI search service for PostgreSQL configuration to optimi…
Prasanjeet-Microsoft Jan 13, 2025
7c2391c
feat: Implement Consistent Versioning and Tagging for Accelerator Ima…
Pavan-Microsoft Jan 15, 2025
8393614
Merge branch 'main' into dev
Roopan-Microsoft Jan 20, 2025
3789d45
fix: Warning message displayed twice in chat history update (#1630)
Pavan-Microsoft Jan 24, 2025
699dff8
test: unit test cases changes (#1353)
Kiran-Siluveru-Microsoft Jan 28, 2025
461779f
Update default.json
Roopan-Microsoft Feb 6, 2025
e0be943
Update default_contract_assistant_prompt.txt
Roopan-Microsoft Feb 6, 2025
f28ddc6
Update open_ai_functions.py
Roopan-Microsoft Feb 6, 2025
63ec389
Update build-docker.yml
Roopan-Microsoft Feb 6, 2025
e1d37f1
Update create_app.py
Roopan-Microsoft Feb 6, 2025
ec42447
Update test_conversation.py
Roopan-Microsoft Feb 6, 2025
86dd916
Update test_iv_question_answer_tool.py
Roopan-Microsoft Feb 6, 2025
b1f2615
Update test_response_with_search_documents_tool.py
Roopan-Microsoft Feb 6, 2025
3431205
Update test_conversation_flow.py
Roopan-Microsoft Feb 6, 2025
7025c6e
ci: update docker registry logic for main, dev, and demo branches (#1…
Priyanka-Microsoft Feb 7, 2025
8fca481
fix: Updates to change the Azure OpenAI model from `gpt-35-turbo` to …
Roopan-Microsoft Feb 13, 2025
18e1dca
docs: updated numerical queries section in best practices readme (#1670)
Harsh-Microsoft Feb 17, 2025
c13b4e3
Merge branch 'main' into dev
Roopan-Microsoft Feb 17, 2025
1ed3f43
fix: Admin configuration issue fix (#1676)
AjitPadhi-Microsoft Feb 18, 2025
f083af8
Merge branch 'main' into dev
Roopan-Microsoft Feb 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ AZURE_SEARCH_DATASOURCE_NAME=
# Azure OpenAI for generating the answer and computing the embedding of the documents
AZURE_OPENAI_RESOURCE=
AZURE_OPENAI_API_KEY=
AZURE_OPENAI_MODEL=gpt-35-turbo
AZURE_OPENAI_MODEL_NAME=gpt-35-turbo
AZURE_OPENAI_MODEL=gpt-4o
AZURE_OPENAI_MODEL_NAME=gpt-4o
AZURE_OPENAI_EMBEDDING_MODEL=text-embedding-ada-002
AZURE_OPENAI_TEMPERATURE=0
AZURE_OPENAI_TOP_P=1.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bicep-audit.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Validate bicep templates
on:
push:
branches:
branches:
- main
paths:
- "**/*.bicep"
pull_request:
branches:
branches:
- main
paths:
- "**/*.bicep"
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:
- dev
- demo
types:
- opened
- ready_for_review
- reopened
- synchronize
- opened
- ready_for_review
- reopened
- synchronize
merge_group:
workflow_dispatch:

Expand All @@ -32,8 +32,10 @@ jobs:
dockerfile: docker/Frontend.Dockerfile
uses: ./.github/workflows/build-docker.yml
with:
registry: ${{ github.ref_name == 'main' && 'fruoccopublic.azurecr.io' || 'cwydcontainerreg.azurecr.io'}}
username: ${{ github.ref_name == 'main' && 'fruoccopublic' || 'cwydcontainerreg'}}
old_registry: ${{ github.ref_name == 'main' && 'fruoccopublic.azurecr.io' }}
new_registry: 'cwydcontainerreg.azurecr.io'
old_username: ${{ github.ref_name == 'main' && 'fruoccopublic' }}
new_username: 'cwydcontainerreg'
app_name: ${{ matrix.app_name }}
dockerfile: ${{ matrix.dockerfile }}
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' }}
Expand Down
53 changes: 41 additions & 12 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ name: Reusable Docker build and push workflow
on:
workflow_call:
inputs:
registry:
old_registry:
required: true
type: string
username:
old_username:
required: true
type: string
new_registry:
required: true
type: string
new_username:
required: true
type: string
app_name:
Expand All @@ -31,20 +37,30 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Docker Login
# Login for 'main' branch to both registries
- name: Docker Login to fruoccopublic (Main)
if: ${{ inputs.push == true && github.ref_name == 'main' }}
uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
registry: ${{ inputs.old_registry }}
username: ${{ inputs.old_username }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Dev Docker Login
- name: Docker Login to cwydcontainerreg (Main)
if: ${{ inputs.push == true && github.ref_name == 'main' }}
uses: docker/login-action@v3
with:
registry: ${{ inputs.new_registry }}
username: ${{ inputs.new_username }}
password: ${{ secrets.DEV_DOCKER_PASSWORD }}

# Login for 'dev' and 'demo' branches to cwydcontainerreg only
- name: Docker Login to cwydcontainerreg (Dev/Demo)
if: ${{ inputs.push == true && (github.ref_name == 'dev' || github.ref_name == 'demo') }}
uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
registry: ${{ inputs.new_registry }}
username: ${{ inputs.new_username }}
password: ${{ secrets.DEV_DOCKER_PASSWORD }}

- name: Set up Docker Buildx
Expand All @@ -54,13 +70,26 @@ jobs:
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Build Docker Image and optionally push
- name: Build Docker Image and optionally push (Old Registry)
if: ${{ github.ref_name == 'main' }}
uses: docker/build-push-action@v6
with:
context: .
file: ${{ inputs.dockerfile }}
push: ${{ inputs.push }}
cache-from: type=registry,ref=${{ inputs.old_registry }}/${{ inputs.app_name }}:${{ github.ref_name == 'main' && 'latest' || github.head_ref || github.ref_name }}
tags: |
${{ inputs.old_registry }}/${{ inputs.app_name }}:${{ github.ref_name == 'main' && 'latest' || github.head_ref || 'default' }}
${{ inputs.old_registry }}/${{ inputs.app_name }}:${{ steps.date.outputs.date }}_${{ github.run_number }}

- name: Build Docker Image and optionally push (New Registry)
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' }}
uses: docker/build-push-action@v6
with:
context: .
file: ${{ inputs.dockerfile }}
push: ${{ inputs.push }}
cache-from: type=registry,ref=${{ inputs.registry }}/${{ inputs.app_name}}:${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.head_ref || github.ref_name }}
cache-from: type=registry,ref=${{ inputs.new_registry }}/${{ inputs.app_name }}:${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.head_ref || github.ref_name }}
tags: |
${{ inputs.registry }}/${{ inputs.app_name}}:${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.head_ref || 'default' }}
${{ inputs.registry }}/${{ inputs.app_name}}:${{ steps.date.outputs.date }}_${{ github.run_number }}
${{ inputs.new_registry }}/${{ inputs.app_name }}:${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.head_ref || 'default' }}
${{ inputs.new_registry }}/${{ inputs.app_name }}:${{ steps.date.outputs.date }}_${{ github.run_number }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# generated frontend files
code/dist/
code/frontend/coverage

# User-specific files
*.rsuser
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ Select either "PostgreSQL" or "Cosmos DB":

When Deployment is complete, follow steps in [Set Up Authentication in Azure App Service](./docs/azure_app_service_auth_setup.md) to add app authentication to your web app running on Azure App Service

**Note**: The default configuration deploys an OpenAI Model "gpt-35-turbo" with version 0613. However, not all
locations support this version. If you're deploying to a location that doesn't support version 0613, you'll need to
**Note**: The default configuration deploys an OpenAI Model "gpt-4o" with version 2024-05-13. However, not all
locations support this version. If you're deploying to a location that doesn't support version 2024-05-13, you'll need to
switch to a lower version. To find out which versions are supported in different regions, visit the
[GPT-35 Turbo Model Availability](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-35-turbo-model-availability) page.
[GPT-4o Model Availability](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#global-standard-model-availability) page.

### Testing the deployment
1. Navigate to the admin site, where you can upload documents. It will be located at:
Expand Down
4 changes: 2 additions & 2 deletions code/backend/batch/utilities/helpers/env_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ def __load_config(self, **kwargs) -> None:
else:
# Otherwise, fallback to individual environment variables
self.AZURE_OPENAI_MODEL = os.getenv(
"AZURE_OPENAI_MODEL", "gpt-35-turbo-16k"
"AZURE_OPENAI_MODEL", "gpt-4o"
)
self.AZURE_OPENAI_MODEL_NAME = os.getenv(
"AZURE_OPENAI_MODEL_NAME", "gpt-35-turbo-16k"
"AZURE_OPENAI_MODEL_NAME", "gpt-4o"
)

self.AZURE_OPENAI_VISION_MODEL = os.getenv("AZURE_OPENAI_VISION_MODEL", "gpt-4")
Expand Down
95 changes: 50 additions & 45 deletions code/backend/pages/04_Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,17 +410,21 @@ def validate_documents():

if st.form_submit_button("Save configuration"):
document_processors = []
should_save = True
if env_helper.AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION is False:
valid = all(
row["document_type"]
and row["chunking_strategy"]
and row["chunking_size"]
and row["chunking_overlap"]
and row["loading_strategy"]
for row in edited_document_processors
)
if not valid:
st.error(
"Please ensure all fields are selected and not left blank in Document processing configuration."
)
should_save = False
document_processors = list(
map(
lambda x: {
Expand All @@ -440,51 +444,52 @@ def validate_documents():
edited_document_processors,
)
)
current_config = {
"prompts": {
"condense_question_prompt": "", # st.session_state['condense_question_prompt'],
"answering_system_prompt": st.session_state[
"answering_system_prompt"
],
"answering_user_prompt": st.session_state["answering_user_prompt"],
"use_on_your_data_format": st.session_state[
"use_on_your_data_format"
],
"post_answering_prompt": st.session_state["post_answering_prompt"],
"enable_post_answering_prompt": st.session_state[
"enable_post_answering_prompt"
],
"enable_content_safety": st.session_state["enable_content_safety"],
"ai_assistant_type": st.session_state["ai_assistant_type"],
"conversational_flow": st.session_state["conversational_flow"],
},
"messages": {
"post_answering_filter": st.session_state[
"post_answering_filter_message"
]
},
"example": {
"documents": st.session_state["example_documents"],
"user_question": st.session_state["example_user_question"],
"answer": st.session_state["example_answer"],
},
"document_processors": document_processors,
"logging": {
"log_user_interactions": st.session_state["log_user_interactions"],
"log_tokens": st.session_state["log_tokens"],
},
"orchestrator": {"strategy": st.session_state["orchestrator_strategy"]},
"integrated_vectorization_config": (
integrated_vectorization_config
if env_helper.AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION
else None
),
"enable_chat_history": st.session_state["enable_chat_history"],
}
ConfigHelper.save_config_as_active(current_config)
st.success(
"Configuration saved successfully! Please restart the chat service for these changes to take effect."
)
if should_save:
current_config = {
"prompts": {
"condense_question_prompt": "", # st.session_state['condense_question_prompt'],
"answering_system_prompt": st.session_state[
"answering_system_prompt"
],
"answering_user_prompt": st.session_state["answering_user_prompt"],
"use_on_your_data_format": st.session_state[
"use_on_your_data_format"
],
"post_answering_prompt": st.session_state["post_answering_prompt"],
"enable_post_answering_prompt": st.session_state[
"enable_post_answering_prompt"
],
"enable_content_safety": st.session_state["enable_content_safety"],
"ai_assistant_type": st.session_state["ai_assistant_type"],
"conversational_flow": st.session_state["conversational_flow"],
},
"messages": {
"post_answering_filter": st.session_state[
"post_answering_filter_message"
]
},
"example": {
"documents": st.session_state["example_documents"],
"user_question": st.session_state["example_user_question"],
"answer": st.session_state["example_answer"],
},
"document_processors": document_processors,
"logging": {
"log_user_interactions": st.session_state["log_user_interactions"],
"log_tokens": st.session_state["log_tokens"],
},
"orchestrator": {"strategy": st.session_state["orchestrator_strategy"]},
"integrated_vectorization_config": (
integrated_vectorization_config
if env_helper.AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION
else None
),
"enable_chat_history": st.session_state["enable_chat_history"],
}
ConfigHelper.save_config_as_active(current_config)
st.success(
"Configuration saved successfully! Please restart the chat service for these changes to take effect."
)

with st.popover(":red[Reset configuration to defaults]"):

Expand Down
Loading
Loading