Skip to content
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

fix: merging dev fixes into main branch #1622

Merged
merged 42 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 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
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def __init__(self) -> None:
self.message_id = str(uuid4())
self.tokens = {"prompt": 0, "completion": 0, "total": 0}
logger.debug(f"New message id: {self.message_id} with tokens {self.tokens}")
self.conversation_logger: ConversationLogger = ConversationLogger()
if str(self.config.logging.log_user_interactions).lower() == "true":
self.conversation_logger: ConversationLogger = ConversationLogger()
self.content_safety_checker = ContentSafetyChecker()
self.output_parser = OutputParserTool()

Expand Down
9 changes: 6 additions & 3 deletions code/backend/batch/utilities/parser/output_parser_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ def _get_source_docs_from_answer(self, answer):

def _make_doc_references_sequential(self, answer):
doc_matches = list(re.finditer(r"\[doc\d+\]", answer))
updated_answer = answer
offset = 0
for i, match in enumerate(doc_matches):
start, end = match.span()
answer = answer[:start] + f"[doc{i + 1}]" + answer[end:]
return answer
start, end = match.start() + offset, match.end() + offset
updated_answer = updated_answer[:start] + f"[doc{i + 1}]" + updated_answer[end:]
offset += len(f"[doc{i + 1}]") - (end - start)
return updated_answer

def parse(
self,
Expand Down
20 changes: 11 additions & 9 deletions infra/app/adminweb.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,17 @@ module adminweb '../core/host/appservice.bicep' = {
).key1
AZURE_SEARCH_KEY: useKeyVault
? searchKeyName
: listAdminKeys(
resourceId(
subscription().subscriptionId,
resourceGroup().name,
'Microsoft.Search/searchServices',
azureAISearchName
),
'2021-04-01-preview'
).primaryKey
: (azureAISearchName != ''
? listAdminKeys(
resourceId(
subscription().subscriptionId,
resourceGroup().name,
'Microsoft.Search/searchServices',
azureAISearchName
),
'2021-04-01-preview'
).primaryKey
: '')
AZURE_BLOB_ACCOUNT_KEY: useKeyVault
? storageAccountKeyName
: listKeys(
Expand Down
20 changes: 11 additions & 9 deletions infra/app/function.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,17 @@ module function '../core/host/functions.bicep' = {
).key1
AZURE_SEARCH_KEY: useKeyVault
? searchKeyName
: listAdminKeys(
resourceId(
subscription().subscriptionId,
resourceGroup().name,
'Microsoft.Search/searchServices',
azureAISearchName
),
'2021-04-01-preview'
).primaryKey
: (azureAISearchName != ''
? listAdminKeys(
resourceId(
subscription().subscriptionId,
resourceGroup().name,
'Microsoft.Search/searchServices',
azureAISearchName
),
'2021-04-01-preview'
).primaryKey
: '')
AZURE_BLOB_ACCOUNT_KEY: useKeyVault
? storageAccountKeyName
: listKeys(
Expand Down
11 changes: 8 additions & 3 deletions infra/app/machinelearning.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource machineLearningWorkspace 'Microsoft.MachineLearningServices/workspaces@
}
}

resource aisearch_connection 'Microsoft.MachineLearningServices/workspaces/connections@2024-01-01-preview' = {
resource aisearch_connection 'Microsoft.MachineLearningServices/workspaces/connections@2024-01-01-preview' = if (azureAISearchName != '') {
parent: machineLearningWorkspace
name: 'aisearch_connection'
properties: {
Expand All @@ -42,7 +42,12 @@ resource aisearch_connection 'Microsoft.MachineLearningServices/workspaces/conne
}
}

var azureOpenAIId = resourceId(subscription().subscriptionId, resourceGroup().name, 'Microsoft.CognitiveServices/accounts', azureOpenAIName)
var azureOpenAIId = resourceId(
subscription().subscriptionId,
resourceGroup().name,
'Microsoft.CognitiveServices/accounts',
azureOpenAIName
)

resource openai_connection 'Microsoft.MachineLearningServices/workspaces/connections@2024-01-01-preview' = {
parent: machineLearningWorkspace
Expand All @@ -61,4 +66,4 @@ resource openai_connection 'Microsoft.MachineLearningServices/workspaces/connect
}
}

output workspaceName string = machineLearningWorkspace.name
output workspaceName string = machineLearningWorkspace.name
4 changes: 2 additions & 2 deletions infra/app/storekeys.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ resource openAIKeySecret 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = {
}
}

resource searchKeySecret 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = {
resource searchKeySecret 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = if (azureAISearchName != '') {
parent: keyVault
name: searchKeyName
properties: {
Expand Down Expand Up @@ -135,7 +135,7 @@ resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {

output CONTENT_SAFETY_KEY_NAME string = contentSafetyKeySecret.name
output FORM_RECOGNIZER_KEY_NAME string = formRecognizerKeySecret.name
output SEARCH_KEY_NAME string = searchKeySecret.name
output SEARCH_KEY_NAME string = azureAISearchName != '' ? searchKeySecret.name : ''
output OPENAI_KEY_NAME string = openAIKeySecret.name
output STORAGE_ACCOUNT_KEY_NAME string = storageAccountKeySecret.name
output SPEECH_KEY_NAME string = speechKeySecret.name
Expand Down
20 changes: 11 additions & 9 deletions infra/app/web.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,17 @@ module web '../core/host/appservice.bicep' = {
).key1
AZURE_SEARCH_KEY: useKeyVault
? searchKeyName
: listAdminKeys(
resourceId(
subscription().subscriptionId,
resourceGroup().name,
'Microsoft.Search/searchServices',
azureAISearchName
),
'2021-04-01-preview'
).primaryKey
: (azureAISearchName != ''
? listAdminKeys(
resourceId(
subscription().subscriptionId,
resourceGroup().name,
'Microsoft.Search/searchServices',
azureAISearchName
),
'2021-04-01-preview'
).primaryKey
: '')
AZURE_BLOB_ACCOUNT_KEY: useKeyVault
? storageAccountKeyName
: listKeys(
Expand Down
Loading
Loading