Skip to content

Commit 97962a1

Browse files
Merge pull request #62 from microsoft/bug5579date
fix: asking date then format 24hrs fix
2 parents c87e907 + 2fb43fa commit 97962a1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ClientAdvisor/AzureFunction/function_app.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def get_SQL_Response(
100100
Do not include assets values unless asked for.
101101
Always use ClientId = {clientid} in the query filter.
102102
Always return client name in the query.
103-
Always return time in "HH:mm" format for the client meetings in response.
104-
If asked, provide information about client meetings according to the requested timeframe: give details about upcoming meetings if asked for "next" or "upcoming" meetings, and provide details about past meetings if asked for "previous" or "last" meetings, including the scheduled time in the query.
103+
If a question involves date and time, always use FORMAT(YourDateTimeColumn, 'yyyy-MM-dd HH:mm:ss') in the query.
104+
If asked, provide information about client meetings according to the requested timeframe: give details about upcoming meetings if asked for "next" or "upcoming" meetings, and provide details about past meetings if asked for "previous" or "last" meetings including the scheduled time and don't filter with "LIMIT 1" in the query.
105105
If asked about the number of past meetings with this client, provide the count of records where the ConversationId is neither null nor an empty string and the EndTime is before the current date in the query.
106106
If asked, provide a summary of the most recent meeting with the client from past dates in the query.
107107
If asked, provide information on the client's investment risk tolerance level in the query.
@@ -231,7 +231,7 @@ def get_answers_from_calltranscripts(
231231

232232
answer = completion.choices[0].message.content
233233
return answer
234-
234+
235235
# Get data from Azure Open AI
236236
async def stream_processor(response):
237237
async for message in response:
@@ -276,7 +276,7 @@ async def stream_openai_text(req: Request) -> StreamingResponse:
276276

277277
system_message = '''you are a helpful assistant to a wealth advisor.
278278
Do not answer any questions not related to wealth advisors queries.
279-
If asked, provide information about client meetings according to the requested timeframe: give details about upcoming meetings if asked for "next" or "upcoming" meetings, and provide details about past meetings if asked for "previous" or "last" meetings, including the scheduled time.
279+
If asked, provide information about client meetings according to the requested timeframe: give details about upcoming meetings if asked for "next" or "upcoming" meetings, and provide details about past meetings if asked for "previous" or "last" meetings including the scheduled time.
280280
If asked about the number of past meetings with this client, provide the count of records where the ConversationId is neither null nor an empty string and the EndTime is before the current date.
281281
If asked, provide a summary of the most recent meeting with the client from past dates.
282282
If asked, provide information on the client's investment risk tolerance level.
@@ -289,6 +289,7 @@ async def stream_openai_text(req: Request) -> StreamingResponse:
289289
If asked to summarize each transcript, provide a summary for all available transcripts and ensure all call transcript's summary should returned.
290290
Always recognize and respond to the selected client by their full name or common variations (e.g., "Karen" and "Karen Berg" should be treated as the same client if Karen Berg is selected).
291291
Ensure responses are consistent and up-to-date, clearly stating the date of the data to avoid confusion
292+
If asked to summarize each transcript, provide a summary for all available transcripts and ensure all call transcript's summary should returned.
292293
If the client name and client id do not match, only return - Please only ask questions about the selected client or select another client to inquire about their details. do not return any other information.
293294
Only use the client name returned from database in the response.
294295
If you cannot answer the question, always return - I cannot answer this question from the data available. Please rephrase or add more details.

0 commit comments

Comments
 (0)