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.57k stars 2.43k forks source link

Error clearing current chat and Error: could not delete item #244

Open wchucgf opened 1 year ago

wchucgf commented 1 year ago

when clicking "broom" icon to clear chat window i get "Error clearing current chat" and when trying to delete a chat history item or all chat history i get "Error: could not delete item"

any idea why it might be?

wchucgf commented 1 year ago

"DELETE /history/delete HTTP/1.1" 500 error - when "broom" clear button is clicked....

edercarlima commented 1 year ago

I'm also having the same problem. I downloaded it from github and deployed it. I ask the questions and when I click to clear, it doesn't clear. To enable cleaning and storage of history, do you need to perform some procedure or upload the json file that is in the infrastructure through the azure template?

davidm00 commented 11 months ago

@wchucgf @edercarlima Hi, does this issue still persist? If you cloned the repo and deployed manually, I would ensure that you have the following environment variables in your web app or local env:

image

wchucgf commented 11 months ago

@wchucgf @edercarlima Hi, does this issue still persist? If you cloned the repo and deployed manually, I would ensure that you have the following environment variables in your web app or local env:

image

yes issue persists. correct i cloned the repo and deployed to my already existing web apps and cosmos. those variables are set else the history wouldn't get logged - history gets logged fine, just cant delete it any of the history

edercarlima commented 11 months ago

@wchucgf I managed to solve the problem through a correction made through another issue.

AmirTamj commented 10 months ago

@wchucgf I managed to solve the problem through a correction made through another issue.

@edercarlima Any pointer or steps that you could share to resolve this?

robertfalcone commented 9 months ago

How did you resolve the issue?

jasonhumsft commented 8 months ago

Sharing how we resolved similar issue here.

In our case, the "conversations" container in Cosmos DB is created manually, and initially the container was created with wrong partition key "/userid", but the code writes all data with property name "userId" (and the code doesn't use "userid" at all, so the value of partition key for all data is empty).

When the code tries to delete data with the value of "userId" as partition key, it couldn't locate the partition and raises 404 error. It was resolved by recreating the "conversations" container with correct partition key "/userId".

If anyone encounters similar issue, maybe can double check how the "conversations" container was created. If possible, using the Bicep templates included in this project to create all resources.