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 5602 | Chatbot Client Context Recognition #141

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
4 changes: 3 additions & 1 deletion ClientAdvisor/AzureFunction/function_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ async def stream_openai_text(req: Request) -> StreamingResponse:
Do not answer any questions not related to wealth advisors queries.
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.
Only use the client name returned from database in the response.
Always consider to give selected client full name only in response and do not use other example names also consider my client means currently selected client.
If you cannot answer the question, always return - I cannot answer this question from the data available. Please rephrase or add more details.
** Remove any client identifiers or ids or numbers or ClientId in the final response.
Client name **must be** same as retrieved from database.
'''

user_query = query.replace('?',' ')
Expand All @@ -280,4 +282,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")