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.15k forks source link

Chat history errors related to CosmosDB database not found. #819

Closed lizylgit closed 2 months ago

lizylgit commented 2 months ago

I have deployed the App using Azure AI studio, with chat history enabled. However, when using the App, chat history is appearing as not enabled, a popup with the below error. And, chat conversations are not getting stored in the CosmosDB database.

I can confirm that the App CosmosDB environment variables are matching with the CosmosDB account, database and url. This was working a day before.

Please guide me, if I am missing anything? (In my account, there is no CosmosDB Account Key set - which other forums mentioned with a similar issue). I am required to provide this app for demoing to our leadership. Thanks

-- Error seen on when browsing the app: "Chat history is not enabled CosmosDB database db_conversation_history on account https://appname....com:443/ not found. Please contact the site administrator."


To Reproduce Steps to reproduce the behavior:

  1. Go to 'Azure OpenAI'
  2. Click on 'Chat'
  3. Use your own data option
  4. Select data sources - existing Azure AI Search . (This data source was created previously 3days ago in AI studio did not want to create a new storage each time.)
    -Select existing AI Service -Select AI Service index
  5. Deploy new App. with Chat enabled option.
  6. Expected behavior Chat history should be recorded in the 'chat history button' and user conversations stored in the CosmosDB.

Screenshots -- CosmosDB environment variables

Screenshot 2024-04-26 at 12 33 08 pm

-- chat history error when app is loaded.

Screenshot 2024-04-26 at 2 19 12 pm

Configuration: Please provide the following

Thanks

lizylgit commented 2 months ago

@sarah-widder, any advice on this would be greatly appreciated. Thanks.

lizylgit commented 2 months ago

It is working for me now.

mittalpatel130 commented 1 month ago

@lizylgit - Can you please tell me how did you solve this? I'm getting exact same error message.

mittalpatel130 commented 1 month ago

@sarah-widder - Can you please post the solution here, I am also facing the same error message. Thank you!