Skip to content

Commit 0e4acec

Browse files
Merge pull request #76 from microsoft/PSL-BUG-7953
fix: Modified the system message to fetch the action items from the previous meeting with the client and upgraded the open AI API Version
2 parents 4b8ad91 + b686475 commit 0e4acec

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

ClientAdvisor/AzureFunction/function_app.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def greeting(self, input: Annotated[str, "the question"]) -> Annotated[str, "The
4040
client = openai.AzureOpenAI(
4141
azure_endpoint=endpoint,
4242
api_key=api_key,
43-
api_version="2023-09-01-preview"
43+
api_version=api_version
4444
)
4545
deployment = os.environ.get("AZURE_OPEN_AI_DEPLOYMENT_MODEL")
4646
try:
@@ -75,7 +75,7 @@ def get_SQL_Response(
7575
client = openai.AzureOpenAI(
7676
azure_endpoint=endpoint,
7777
api_key=api_key,
78-
api_version="2023-09-01-preview"
78+
api_version=api_version
7979
)
8080
deployment = os.environ.get("AZURE_OPEN_AI_DEPLOYMENT_MODEL")
8181

@@ -164,15 +164,15 @@ def get_answers_from_calltranscripts(
164164
client = openai.AzureOpenAI(
165165
azure_endpoint= endpoint, #f"{endpoint}/openai/deployments/{deployment}/extensions",
166166
api_key=apikey,
167-
api_version="2024-02-01"
167+
api_version=api_version
168168
)
169169

170170
query = question
171171
system_message = '''You are an assistant who provides wealth advisors with helpful information to prepare for client meetings.
172172
You have access to the client’s meeting call transcripts.
173-
If asked, consistently provide the action items from the last or previous client meeting only for past dates.
173+
When asked about action items from previous meetings with the client, **ALWAYS provide information only for the most recent dates**.
174174
If asked, consistently provide the summary of the last meeting with the client only for past dates.
175-
If asked to summarize each transcript, provide a summary for all available transcripts and ensure all call transcript's summary should returned.
175+
If asked to summarize each transcript, consistently provide a summary with Date and time for all available transcripts and ensure all call transcript's summary should returned with date and time. (i.e "First Call summary Date Time", "Second Call Summary Date Time" and so on.)
176176
Always return time in "HH:mm" format for the client in response.
177177
You can use this information to answer questions about the clients'''
178178

ClientAdvisor/Deployment/bicep/main.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ module azureFunctions 'deploy_azure_function_script.bicep' = {
109109
solutionLocation: solutionLocation
110110
resourceGroupName:resourceGroupName
111111
azureOpenAIApiKey:azOpenAI.outputs.openAIOutput.openAPIKey
112-
azureOpenAIApiVersion:'2023-09-01-preview'
112+
azureOpenAIApiVersion:'2024-02-15-preview'
113113
azureOpenAIEndpoint:azOpenAI.outputs.openAIOutput.openAPIEndpoint
114114
azureSearchAdminKey:azSearchService.outputs.searchServiceOutput.searchServiceAdminKey
115115
azureSearchServiceEndpoint:azSearchService.outputs.searchServiceOutput.searchServiceEndpoint
@@ -147,7 +147,7 @@ module keyvaultModule 'deploy_keyvault.bicep' = {
147147
adlsAccountName:storageAccountModule.outputs.storageAccountOutput.storageAccountName
148148
adlsAccountKey:storageAccountModule.outputs.storageAccountOutput.key
149149
azureOpenAIApiKey:azOpenAI.outputs.openAIOutput.openAPIKey
150-
azureOpenAIApiVersion:'2023-07-01-preview'
150+
azureOpenAIApiVersion:'2024-02-15-preview'
151151
azureOpenAIEndpoint:azOpenAI.outputs.openAIOutput.openAPIEndpoint
152152
azureSearchAdminKey:azSearchService.outputs.searchServiceOutput.searchServiceAdminKey
153153
azureSearchServiceEndpoint:azSearchService.outputs.searchServiceOutput.searchServiceEndpoint

ClientAdvisor/Deployment/bicep/main.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"_generator": {
66
"name": "bicep",
77
"version": "0.29.47.4906",
8-
"templateHash": "13936106300349938200"
8+
"templateHash": "13616077515444443649"
99
}
1010
},
1111
"parameters": {
@@ -1015,7 +1015,7 @@
10151015
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'deploy_azure_open_ai'), '2022-09-01').outputs.openAIOutput.value.openAPIKey]"
10161016
},
10171017
"azureOpenAIApiVersion": {
1018-
"value": "2023-09-01-preview"
1018+
"value": "2024-02-15-preview"
10191019
},
10201020
"azureOpenAIEndpoint": {
10211021
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'deploy_azure_open_ai'), '2022-09-01').outputs.openAIOutput.value.openAPIEndpoint]"
@@ -1233,7 +1233,7 @@
12331233
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'deploy_azure_open_ai'), '2022-09-01').outputs.openAIOutput.value.openAPIKey]"
12341234
},
12351235
"azureOpenAIApiVersion": {
1236-
"value": "2023-07-01-preview"
1236+
"value": "2024-02-15-preview"
12371237
},
12381238
"azureOpenAIEndpoint": {
12391239
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'deploy_azure_open_ai'), '2022-09-01').outputs.openAIOutput.value.openAPIEndpoint]"

0 commit comments

Comments
 (0)