microsoft / sample-app-aoai-chatGPT

Sample code for a simple web chat experience through Azure OpenAI, including Azure OpenAI On Your Data.
MIT License
1.43k stars 2.14k forks source link

Retain all chat history - Allow "broom" icon to be hidden, and allow "Clear chat history" to be hidden or disabled. #870

Open gw37 opened 1 month ago

gw37 commented 1 month ago

Background: We implement for all our customers the option to enable chat history in CosmosDB and to set the variable _AZURE_COSMOSDB_ENABLEFEEDBACK=True. With conversation history in place we then create a PowerBI report for the application owner to get visibility to what questions are asked and where the grounding data need to be improved.

Feature Request: We would like to have environment variables added to allow removing the "broom" icon and also disabling/removing the "Clear chat history" action. Both of these actions delete useful data from the database. These changes would eliminate the concern that the "broom" icon is meant to start a new chat but not necessarily to delete the current conversation from the database.

Alternatives: Currently the alternative is to customize the source code and push the changes at to the web app. This is not optimal since we then have to maintain those custom changes into future versions of this code repository. We have found the environment variables such as UI_TITLE and _ENABLE_FEEDBACK very helpful, and would like to extend that idea here to retain all conversation history.