Replies: 2 comments 2 replies
-
Hi @itkrmstk you might check out this repo, which provides very similar code for a chat app: https://github.com/Azure-Samples/azure-search-openai-demo/tree/main but it doesn't use Azure OpenAI On Your Data. Specifically, the ExampleList here https://github.com/Azure-Samples/azure-search-openai-demo/blob/62e22486632194ca387ba3c7187c4db4db8a5425/app/frontend/src/pages/chat/Chat.tsx#L176C29-L176C80 may be what you're looking for. As for changing the system message based on the prompt template, you can customize the backend flow that calls Azure OpenAI however you'd like. Perhaps pass some additional info from the frontend to the backend when an example prompt is picked, and use that to map to a specific system message in the backend before calling chat completions. |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm customizing this sample code for the development of an in-house Chat Web App. I'm thinking of placing several prompt templates on the frontpage to ensure that in-house users don't get confused about how to use it. Please see an image for reference.
As a simple method, I'm considering having pre-set text input into the message box (user input columns which under the prompt templates) when a prompt template is clicked.
For more advanced prompt templates, is it possible to change the system message itself based on the prompt template?
If you have any sample code or resources that have already implemented the above, I would greatly appreciate it if you could share them.
Regards,
Beta Was this translation helpful? Give feedback.
All reactions