Skip to content

Commit 331bd04

Browse files
Rafi-MicrosoftPrajwal-MicrosoftThanusree-MicrosoftPavan-MicrosoftUtkarshMishra-Microsoft
authored
fix: display previous meeting dates when asked “Provide details of last meetings” (#751)
* docs: merge from dev to main Samplequestion (#737) * Update SampleQuestions.md with response time note (#736) Added a note about average response time and formatted the document. Co-authored-by: Prajwal-Microsoft <[email protected]> * fix: update API version to 2025-04-01 and adjust skuCapacity in main.bicep * fix: rename deploymentType parameter to gptModelDeploymentType for clarity * fix: Re-query data after updating sample data to refresh rows (#739) * DataRefreshLogic * pylint * pylintfix * fix * fix: clarify skuCapacity comment in main.bicep for WAF deployment * fix: update skuCapacity configuration for WAF deployment to ensure correct agent handling --------- Co-authored-by: Prajwal-Microsoft <[email protected]> Co-authored-by: Pavan-Microsoft <[email protected]> Co-authored-by: UtkarshMishra-Microsoft <[email protected]> * Add disclaimer for AI solutions in README (#741) Added a disclaimer about AI solutions and compliance. * fix v1 * code cleanup * Remove README changes - reset to dev version --------- Co-authored-by: Prajwal-Microsoft <[email protected]> Co-authored-by: Thanusree-Microsoft <[email protected]> Co-authored-by: Pavan-Microsoft <[email protected]> Co-authored-by: UtkarshMishra-Microsoft <[email protected]>
1 parent 8d4298e commit 331bd04

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

infra/scripts/index_scripts/create_search_index.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
FileSystemClient,
3333
)
3434
from azure.ai.projects import AIProjectClient
35+
from datetime import datetime
3536

3637
# Get Azure Key Vault Client
3738
key_vault_name = "kv_to-be-replaced" #'nc6262-kv-2fpeafsylfd2e'
@@ -79,6 +80,9 @@
7980
SearchableField(name="content", type=SearchFieldDataType.String),
8081
SearchableField(name="sourceurl", type=SearchFieldDataType.String),
8182
SearchableField(name="client_id", type=SearchFieldDataType.String, filterable=True),
83+
SimpleField(name="meeting_start_time", type=SearchFieldDataType.DateTimeOffset, sortable=True, filterable=True),
84+
SimpleField(name="meeting_end_time", type=SearchFieldDataType.DateTimeOffset, sortable=True, filterable=True),
85+
SearchableField(name="meeting_title", type=SearchFieldDataType.String),
8286
SearchField(
8387
name="contentVector",
8488
type=SearchFieldDataType.Collection(SearchFieldDataType.Single),
@@ -253,14 +257,33 @@ def chunk_data(text):
253257

254258
chunks = chunk_data(text)
255259
chunk_num = 0
260+
261+
def convert_to_iso8601(date_str):
262+
"""Convert datetime string to ISO 8601 format with UTC timezone"""
263+
if pd.isna(date_str):
264+
return None
265+
try:
266+
dt = pd.to_datetime(date_str)
267+
return dt.strftime('%Y-%m-%dT%H:%M:%S.000Z')
268+
except:
269+
return None
270+
271+
meeting_start_time = convert_to_iso8601(df_file_metadata.get("StartTime"))
272+
meeting_end_time = convert_to_iso8601(df_file_metadata.get("EndTime"))
273+
meeting_title = str(df_file_metadata["Title"]) if pd.notna(df_file_metadata.get("Title")) else ""
274+
275+
meeting_start_time_display = str(df_file_metadata["StartTime"]) if pd.notna(df_file_metadata.get("StartTime")) else None
276+
256277
for chunk in chunks:
257278
chunk_num += 1
279+
date_context = f"Meeting Date: {meeting_start_time_display}. " if meeting_start_time_display else ""
258280
d = {
259281
"chunk_id": document_id + "_" + str(chunk_num).zfill(2),
260282
"client_id": str(df_file_metadata["ClientId"]),
261283
"content": "ClientId is "
262284
+ str(df_file_metadata["ClientId"])
263285
+ " . "
286+
+ date_context
264287
+ chunk,
265288
}
266289

@@ -285,6 +308,9 @@ def chunk_data(text):
285308
"client_id": d["client_id"],
286309
"content": d["content"],
287310
"sourceurl": path.name.split("/")[-1],
311+
"meeting_start_time": meeting_start_time,
312+
"meeting_end_time": meeting_end_time,
313+
"meeting_title": meeting_title,
288314
"contentVector": v_contentVector,
289315
}
290316
)

0 commit comments

Comments
 (0)