microsoft / sample-app-aoai-chatGPT

Sample code for a simple web chat experience through Azure OpenAI, including Azure OpenAI On Your Data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to remove Show Chat History button from UI?

kagoolastha23 opened this issue · comments

Describe the bug
I want the chat history to be enabled but I don't want the chat history button to be seen on right hand side.

To Reproduce
Steps to reproduce the behavior:
I want to customize the default contoso app and remove the chat history button .Which functions I'll have to delete it?
I have no knowledge of UI and need assistance which functions or modules have to be removed from the folder to make it happen?

Configuration: Please provide the following

  • Azure OpenAI model name and version (e.g. 'gpt-4-32k')
  • Is chat history enabled? Yes
  • Are you using data? If so, what data source? (e.g. Azure AI Search)

Additional context
This is a custom requirement question.

commented

@kagoolastha23 If you only want to remove the chat history button, comment lines 82, 83, 84 of

{(appStateContext?.state.isCosmosDBAvailable?.status !== CosmosDBStatus.NotConfigured) &&

commented

@kagoolastha23 FYI, #771 is a PR that helps with your request on hiding the chat history. Remember that once you hide the chat history and publish it to web services then it cannot be accessed from the UI. You still can retrieve chat history in CosmosDB.

@kagoolastha23 If you only want to remove the chat history button, comment lines 82, 83, 84 of

{(appStateContext?.state.isCosmosDBAvailable?.status !== CosmosDBStatus.NotConfigured) &&

I want to make this change and deploy the app? It is mentioned I need to run start.cmd before deploying the app.I didn't understand that part. I am cloning the repo and using Azure CLI to deploy it to web app.How will I run that in Azure Cloud Shell?

I tried commenting and then running the code. It gives me Application error.

commented

start.cmd is for running the app locally. To deploy it to Azure follow instructions in this section:
https://github.com/microsoft/sample-app-aoai-chatGPT/blob/main/README.md#deploy-with-the-azure-cli

start.cmd is for running the app locally. To deploy it to Azure follow instructions in this section: https://github.com/microsoft/sample-app-aoai-chatGPT/blob/main/README.md#deploy-with-the-azure-cli

NOTE: If you've made code changes, be sure to build the app code with start.cmd or start.sh before you deploy, otherwise your changes will not be picked up. If you've updated any files in the frontend folder, make sure you see updates to the files in the static folder before you deploy. How do I do this step?

commented

from your command terminal run ./start.cmd it builds the full-stack package (python for backend / typescript for the frontend). Have you tried running it from CLI?

sampleissue1 I am getting this error when I commented line 82 83 84 and then executed ./start.sh and deployed the app.

Here is what I am seeing on my application logs
sampleissue1