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.44k stars 2.16k forks source link

How to remove Show Chat History button from UI? #765

Open kagoolastha23 opened 3 months ago

kagoolastha23 commented 3 months ago

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

Additional context This is a custom requirement question.

Hadi2525 commented 2 months ago

@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 commented 2 months ago

@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.

kagoolastha23 commented 2 months ago

@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.

Hadi2525 commented 2 months ago

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

kagoolastha23 commented 2 months ago

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?

Hadi2525 commented 2 months ago

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?

kagoolastha23 commented 2 months ago
sampleissue1

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

kagoolastha23 commented 2 months ago

Here is what I am seeing on my application logs

sampleissue1
github-actions[bot] commented 1 week ago

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