Azure-Samples / chat-with-your-data-solution-accelerator

A Solution Accelerator for the RAG pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences. This includes most common requirements and best practices.
https://azure.microsoft.com/products/search
MIT License
624 stars 294 forks source link

ARM Deploy or Bicep Deploy --- Issue #27

Closed hunterjam closed 9 months ago

hunterjam commented 9 months ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Deploy the ARM manually using “Deploy a custom template”
  2. Copy and paste the deployment.json content into the editor.
  3. Update the 4 parameters (rg, prefix, AI key, AI name)
  4. Deploy
  5. All resources are successfully created.
  6. Navigate to the Admin web site.
  7. Select Explore Data.
  8. Error is returned image
  9. Navigate to the User web site.
  10. Type in a message.
  11. Error is returned. image image image

Any log messages given by the failure

Admin - Explore Data Traceback (most recent call last): File "/usr/local/src/myscripts/pages/02_Explore_Data.py", line 36, in search_client = vector_store_helper.get_vector_store().client File "/usr/local/src/myscripts/utilities/helpers/AzureSearchHelper.py", line 33, in get_vector_store vector_search_dimensions=len(llm_helper.get_embedding_model().embed_query("Text")), File "/usr/local/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 536, in embed_query embedding = self._embedding_func(text, engine=self.deployment) File "/usr/local/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 467, in _embedding_func return embed_with_retry( File "/usr/local/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 107, in embed_with_retry return _embed_with_retry(kwargs) File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 289, in wrapped_f return self(f, *args, *kw) File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 379, in call do = self.iter(retry_state=retry_state) File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 314, in iter return fut.result() File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 439, in result return self.get_result() File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 391, in get_result raise self._exception File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 382, in call result = fn(args, kwargs) File "/usr/local/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 104, in _embed_with_retry response = embeddings.client.create(*kwargs) File "/usr/local/lib/python3.9/site-packages/openai/api_resources/embedding.py", line 33, in create response = super().create(args, **kwargs) File "/usr/local/lib/python3.9/site-packages/openai/api_resources/abstract/engine_apiresource.py", line 153, in create response, , api_key = requestor.request( File "/usr/local/lib/python3.9/site-packages/openai/api_requestor.py", line 298, in request resp, got_stream = self._interpret_response(result, stream) File "/usr/local/lib/python3.9/site-packages/openai/api_requestor.py", line 700, in _interpret_response self._interpret_response_line( File "/usr/local/lib/python3.9/site-packages/openai/api_requestor.py", line 763, in _interpret_response_line raise self.handle_error_response( openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.

User - Chat Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR) /api/conversation/custom:1

Expected/desired behavior

Admin - Explore Data --- View the ingested data User - Chat --- A response from the chat bot

OS and Version?

Windows 11

Versions

No published version

Mention any other details that might be useful

Based on the error messaging, the APIs for this solution were not deployed.

I experienced the same issue using the Bicep deployment with Azure CLI.


Thanks! We'll be in touch soon.

gmndrg commented 9 months ago

Hi @hunterjam Thanks for reporting this, a few things, the expected is to provide a better end user error, but the question is: if you wait after 5 minutes you still see the same error, how about 10 minutes? Adding @ruoccofabrizio for awareness, since we are trying to have everything ready by Friday. Thank you! Just trying to determine if this is a temporary issue and document the time the users must wait after deployment. Thank you!

ruoccofabrizio commented 9 months ago

hi @hunterjam please double check you have the models (gpt-35-turbo and text-embedding-ada-002) deployed in your Azure OpenAI resource. By default the deployment name in the app settings is equal to the model name (gpt-35-turbo and text-embedding-ada-002) If you named the deployment in a different way, you should update the app settings to match your deployment names.

@gmndrg : we may want to highlight this in the article as well as in the documentation.

ruoccofabrizio commented 9 months ago

Just as side note: we don't deploy Azure OpenAI Resource or model in the resource as it's currently a gated service with some restrictions. So,it's supposed that you already have access to it for running the solution and you just provide the details of your existing deployment(s) in the settings. It's the only component not deployed by the ARM or the bicep.

hunterjam commented 9 months ago

Hi @gmndrg and @ruoccofabrizio. Good call out. My deployments were named differently. I deleted the original deployments and created new deployments using the model name. image Within the Admin site, Explore Data looks better. image

Within the User site, still receiving the same error: image image

ruoccofabrizio commented 9 months ago

Thanks for the feedback @hunterjam By default,the orchestrator uses the function concept of Azure OpenAI, available only on version 0613 of turbo. Your model is currently on a previous version, which does not expose such functionality. I am writing a documentation note to address it and a parameter in the settings (and ARM/ Bicep) to switch to a LangChain orchestrator when you want to use your model version. In the meanwhile, if you update the version, you should be fine.

gmndrg commented 9 months ago

[heart] Gia Mondragon reacted to your message:


From: Fabrizio Ruocco @.> Sent: Wednesday, August 23, 2023 8:15:46 PM To: Azure-Samples/azure-search-openai-solution-accelerator @.> Cc: Comment @.***> Subject: Re: [Azure-Samples/azure-search-openai-solution-accelerator] ARM Deploy or Bicep Deploy --- Issue (Issue #27)

Thanks for the feedback @hunterjamhttps://github.com/hunterjam By default,the orchestrator uses the function concept of Azure OpenAI, available only on version 0613 of turbo. Your model is currently on a previous version, which does not expose such functionality. I am writing a documentation note to address it and a parameter in the settings (and ARM/ Bicep) to switch to a LangChain orchestrator when you want to use your model version. In the meanwhile, if you update the version, you should be fine.

— Reply to this email directly, view it on GitHubhttps://github.com/Azure-Samples/azure-search-openai-solution-accelerator/issues/27#issuecomment-1690577825 or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALBWI76VIP7UANVP6OAZV3TXWZQHHBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVE3DIOJZGQZTEMZQQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRRHA3DGOBYGE2TGONHORZGSZ3HMVZKMY3SMVQXIZI. You are receiving this email because you commented on the thread.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

hunterjam commented 9 months ago

@ruoccofabrizio @gmndrg --- Fantastic. Looks like we are up and running. Thank you both very much for your help. image

gmndrg commented 9 months ago

Thank you, James for reporting this before we go live (awesome!) and Fabri for everything as usual! 😊

From: James Hunter @.> Sent: Wednesday, August 23, 2023 2:30 PM To: Azure-Samples/azure-search-openai-solution-accelerator @.> Cc: Mention @.>; Comment @.> Subject: Re: [Azure-Samples/azure-search-openai-solution-accelerator] ARM Deploy or Bicep Deploy --- Issue (Issue #27)

@ruoccofabriziohttps://github.com/ruoccofabrizio @gmndrghttps://github.com/gmndrg --- Fantastic. Looks like we are up and running. Thank you both very much for your help. image.png (view on web)https://github.com/Azure-Samples/azure-search-openai-solution-accelerator/assets/31451884/114cce5e-8744-47fb-953b-ec18d40e014f

— Reply to this email directly, view it on GitHubhttps://github.com/Azure-Samples/azure-search-openai-solution-accelerator/issues/27#issuecomment-1690594245 or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALBWI7Y5CKB2UBZBT2ZOWFLXWZR27BFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVE3DIOJZGQZTEMZQQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRRHA3DGOBYGE2TGONHORZGSZ3HMVZKMY3SMVQXIZI. You are receiving this email because you were mentioned.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ruoccofabrizio commented 9 months ago

added a note to the README to address this. @gmndrg @aahill: please have a look at it

hi @hunterjam please double check you have the models (gpt-35-turbo and text-embedding-ada-002) deployed in your Azure OpenAI resource. By default the deployment name in the app settings is equal to the model name (gpt-35-turbo and text-embedding-ada-002) If you named the deployment in a different way, you should update the app settings to match your deployment names.

@gmndrg : we may want to highlight this in the article as well as in the documentation.

gmndrg commented 9 months ago

Thank you so much, @ruoccofabrizio, I added a note too in my branch :) will check to avoid merge issues and double content. :)

ruoccofabrizio commented 9 months ago

@gmndrg @hunterjam @aahill added a note on the orchestration strategy as well. Please have a look at it in the README.

hunterjam commented 9 months ago

@ruoccofabrizio --- Does this field need to be included in the Environment Variables section for local deployment?

gmndrg commented 9 months ago

[heart] Gia Mondragon reacted to your message:


From: Fabrizio Ruocco @.> Sent: Friday, August 25, 2023 6:35:05 AM To: Azure-Samples/azure-search-openai-solution-accelerator @.> Cc: Comment @.***> Subject: Re: [Azure-Samples/azure-search-openai-solution-accelerator] ARM Deploy or Bicep Deploy --- Issue (Issue #27)

Closed #27https://github.com/Azure-Samples/azure-search-openai-solution-accelerator/issues/27 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/Azure-Samples/azure-search-openai-solution-accelerator/issues/27 or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALBWI7ZCWIYGYGMPW4HQVA3XXBBRTBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJLJONZXKZNENZQW2ZNLORUHEZLBMRPXI6LQMWBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTLDTOVRGUZLDORPXI6LQMWSUS43TOVS2M5DPOBUWG44SQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJWGQ4TSNBTGIZTBAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDCOBWGM4DQMJVGM42O5DSNFTWOZLSUZRWY33TMVSA. You are receiving this email because you commented on the thread.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.