sample-app-aoai-chatGPT icon indicating copy to clipboard operation
sample-app-aoai-chatGPT copied to clipboard

How to remove Show Chat History button from UI?

Open kagoolastha23 opened this issue 10 months ago • 9 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.

kagoolastha23 avatar Apr 08 '24 08:04 kagoolastha23

@kagoolastha23 If you only want to remove the chat history button, comment lines 82, 83, 84 of https://github.com/microsoft/sample-app-aoai-chatGPT/blob/ec893ded14cee8979b51884739a742faaf5075c9/frontend/src/pages/layout/Layout.tsx#L82

Hadi2525 avatar Apr 12 '24 21:04 Hadi2525

@kagoolastha23 FYI, https://github.com/microsoft/sample-app-aoai-chatGPT/pull/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.

Hadi2525 avatar Apr 12 '24 21:04 Hadi2525

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

https://github.com/microsoft/sample-app-aoai-chatGPT/blob/ec893ded14cee8979b51884739a742faaf5075c9/frontend/src/pages/layout/Layout.tsx#L82

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.

kagoolastha23 avatar Apr 15 '24 13:04 kagoolastha23

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

Hadi2525 avatar Apr 15 '24 14:04 Hadi2525

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?

kagoolastha23 avatar Apr 15 '24 15:04 kagoolastha23

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?

Hadi2525 avatar Apr 15 '24 16:04 Hadi2525

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

kagoolastha23 avatar Apr 16 '24 07:04 kagoolastha23

Here is what I am seeing on my application logs sampleissue1

kagoolastha23 avatar Apr 16 '24 07:04 kagoolastha23

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 26 '24 01:06 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 11 '24 01:07 github-actions[bot]