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

CosmosDB is not working Chat history can't be saved at this time

Open cyrilgarnea opened this issue 1 year ago • 10 comments

As in the title, when I deploy the app from the Azure OpenAI Studio, I cannot save the chat history.

Yes, I checked the "Enable chat history in the web app" box before deploying. The cosmos db is visible in my resources.

Is it a bug? Or can it be solved by properly setting some environment variable?

Thanks a lot

cyrilgarnea avatar Nov 22 '23 19:11 cyrilgarnea

Hi @cyrilgarnea it may be an issue with authentication between your app and the CosmosDB. You may be able to resolve this by adding an environment variable "AZURE_COSMOSDB_ACCOUNT_KEY" and setting the value to an account key from your cosmosdb resource. Hope that helps.

sarah-widder avatar Nov 28 '23 18:11 sarah-widder

Hi @sarah-widder, Thanks for the tip, the account_key did not exist in my environment variables. However, it did not solve the issue. Do I need to provide the endpoint of the CosmosDB ? Set an environment variable as the "PRIMARY CONNECTION STRING" in addition to the AZURE_COSMOSDB_ACCOUNT_KEY as the PRIMARY KEY ?

cyrilgarnea avatar Nov 28 '23 19:11 cyrilgarnea

Any updates on this? I am also running into this issue now using the most recent updates. Have a previous version from a month or so ago that seems to work fine however.

nickorrnah avatar Dec 20 '23 22:12 nickorrnah

Facing the same issue right now with the latest app. Can someone kindly look into it?

jainrahulsethi avatar Feb 02 '24 08:02 jainrahulsethi