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: Bug 5663 | Added the system message to ensure consistent and accurate data retrieval for the list of questions. #138

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion ClientAdvisor/AzureFunction/function_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ def get_SQL_Response(
Do not include assets values unless asked for.
Always use ClientId = {clientid} in the query filter.
Always return client name in the query.
If asked, provide information on the client's portfolio performance in the query.
If asked, provide information about the client's top-performing investments in the query.
If asked, provide information about any recent changes in the client's investment allocations in the query.
If asked about the client's portfolio performance over the last quarter, calculate the total investment by summing the investment amounts where AssetDate is greater than or equal to the date from one quarter ago using DATEADD(QUARTER, -1, GETDATE()) in the query.
If asked about upcoming important dates or deadlines for the client, always ensure that StartTime is greater than the current date. Do not convert the formats of StartTime and EndTime and consistently provide the upcoming dates along with the scheduled times in the query.
Only return the generated sql query. do not return anything else'''
try:

Expand Down Expand Up @@ -280,4 +285,4 @@ async def stream_openai_text(req: Request) -> StreamingResponse:
settings=settings
)

return StreamingResponse(stream_processor(sk_response), media_type="text/event-stream")
return StreamingResponse(stream_processor(sk_response), media_type="text/event-stream")