Skip to content

fix: merging dev changes to main branch #1786

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 72 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 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
32ebef3
build: Merge Dependabot Changes into Dev Branch (#1679)
Prasanjeet-Microsoft Feb 28, 2025
2803e48
Merge branch 'main' into dev
Roopan-Microsoft Mar 3, 2025
b5f35ac
Package lock updated
Roopan-Microsoft Mar 3, 2025
0b01abb
Merge remote-tracking branch 'origin/main' into dev
Prajwal-Microsoft Mar 4, 2025
21b57da
docs: Added migration readme file (#1668)
Priyanka-Microsoft Mar 4, 2025
6f30b3f
refactor: enforcing authentication based on environment variable "ENF…
Harsh-Microsoft Mar 24, 2025
9de26fd
build: Merge Dependabot Changes into Dev Branch (#1749)
Prasanjeet-Microsoft Apr 11, 2025
f7a2ce9
chore: Update Azure OpenAI Vision Model configuration to turbo-2024-0…
Harmanpreet-Microsoft Apr 15, 2025
dc763c2
feat: json document processor (#1661)
cristofima Apr 16, 2025
9664143
fix: Resolve chunking issue during deployment when enabling advanced …
Priyanka-Microsoft Apr 21, 2025
e8382d3
Merge branch 'main' into dev
Roopan-Microsoft May 5, 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
2 changes: 1 addition & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

# 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') }}
if: ${{ inputs.push == true && (github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges') }}
uses: docker/login-action@v3
with:
registry: ${{ inputs.new_registry }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class ChunkingStrategy(Enum):
PAGE = "page"
FIXED_SIZE_OVERLAP = "fixed_size_overlap"
PARAGRAPH = "paragraph"
JSON = "json"


class ChunkingSettings:
Expand Down
37 changes: 37 additions & 0 deletions code/backend/batch/utilities/document_chunking/json.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import json
from typing import List
from .document_chunking_base import DocumentChunkingBase
from langchain.text_splitter import RecursiveJsonSplitter
from .chunking_strategy import ChunkingSettings
from ..common.source_document import SourceDocument


class JSONDocumentChunking(DocumentChunkingBase):
def __init__(self) -> None:
pass

def chunk(
self, documents: List[SourceDocument], chunking: ChunkingSettings
) -> List[SourceDocument]:
full_document_content = "".join(
list(map(lambda document: str(document.content), documents))
)
document_url = documents[0].source
json_data = json.loads(full_document_content)
splitter = RecursiveJsonSplitter(max_chunk_size=chunking.chunk_size)
chunked_content_list = splitter.split_json(json_data)
# Create document for each chunk
documents = []
chunk_offset = 0
for idx, chunked_content in enumerate(chunked_content_list):
documents.append(
SourceDocument.from_metadata(
content=str(chunked_content),
document_url=document_url,
metadata={"offset": chunk_offset},
idx=idx,
)
)

chunk_offset += len(chunked_content)
return documents
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .page import PageDocumentChunking
from .fixed_size_overlap import FixedSizeOverlapDocumentChunking
from .paragraph import ParagraphDocumentChunking
from .json import JSONDocumentChunking


def get_document_chunker(chunking_strategy: str):
Expand All @@ -14,5 +15,7 @@ def get_document_chunker(chunking_strategy: str):
return FixedSizeOverlapDocumentChunking()
elif chunking_strategy == ChunkingStrategy.PARAGRAPH.value:
return ParagraphDocumentChunking()
elif chunking_strategy == ChunkingStrategy.JSON.value:
return JSONDocumentChunking()
else:
raise Exception(f"Unknown chunking strategy: {chunking_strategy}")
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def get_available_document_types(self) -> list[str]:
"jpg",
"png",
"docx",
"json"
}
if self.env_helper.USE_ADVANCED_IMAGE_PROCESSING:
document_types.update(ADVANCED_IMAGE_PROCESSING_FILE_TYPES)
Expand Down Expand Up @@ -308,10 +309,10 @@ def clear_config():
@staticmethod
def _append_advanced_image_processors():
image_file_types = ["jpeg", "jpg", "png", "tiff", "bmp"]
ConfigHelper._remove_processors_for_file_types(image_file_types)
# ConfigHelper._remove_processors_for_file_types(image_file_types)
ConfigHelper._default_config["document_processors"].extend(
[
{"document_type": file_type, "use_advanced_image_processing": True}
{"document_type": file_type, "chunking" : ConfigHelper._default_config["document_processors"][0]["chunking"], "loading" : ConfigHelper._default_config["document_processors"][0]["loading"], "use_advanced_image_processing": True}
for file_type in image_file_types
]
)
Expand Down
11 changes: 11 additions & 0 deletions code/backend/batch/utilities/helpers/config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@
"strategy": "docx"
}
},
{
"document_type": "json",
"chunking": {
"strategy": "json",
"size": 500,
"overlap": 100
},
"loading": {
"strategy": "web"
}
},
{
"document_type": "jpg",
"chunking": {
Expand Down
Loading
Loading