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.66k stars 2.62k forks source link

Impossibe to Deploy a Web App in Azure OpenAI studio : An error message #1071

Open azakharovams opened 2 months ago

azakharovams commented 2 months ago

Describe the bug Impossible to deploy to web app, multiple users confirmed that they have the following error message while trying to deploy: "InvalidTemplate: Deployment template validation failed: 'The value for the template parameter 'azureOpenAIEmbeddingEndpoint' at line '1' and column '4690' is not provided. Please see https://aka.ms/arm-create-parameter-file for usage details.'."

To Reproduce Steps to reproduce the behavior in old or new look:

  1. Go to Azure Open AI studio
  2. Select chat playground
  3. Click on Deploy to webapp
  4. See error

Expected behavior It should deploy the app but in the old look, I have the error "InvalidTemplate: Deployment template validation failed: 'The value for the template parameter 'azureOpenAIEmbeddingEndpoint' at line '1' and column '4690' is not provided. Please see https://aka.ms/arm-create-parameter-file for usage details.'." In the new look, I also have an error but it's not specified.

Screenshots image image

azakharovams commented 2 months ago

After conducting multiple tests, we've determined that the web app functions properly only when using the updated new interface (look), and your model, web app, and resource group are all located within the same region.

dljones555 commented 2 months ago

I'm having trouble as well. Switched to new interface. Deployment worked. Says web app is running.

Can you please look at this? I guess I could deploy a standard plan. :(

Logs in Azure shown below.

2024-08-30T21:49:47.832464576Z: [ERROR] WARNING:root:No datasource configuration found in the environment -- calls will be made to Azure OpenAI without grounding data. 2024-08-30T21:49:47.878981802Z: [ERROR] WARNING:root:[{'type': 'missing', 'loc': ('service',), 'msg': 'Field required', 'input': {'top_k': '5', 'strictness': '3', 'enable_in_domain': 'false', 'use_semantic_search': 'false'}, 'url': 'https://errors.pydantic.dev/2.8/v/missing'}, {'type': 'missing', 'loc': ('index',), 'msg': 'Field required', 'input': {'top_k': '5', 'strictness': '3', 'enable_in_domain': 'false', 'use_semantic_search': 'false'}, 'url': 'https://errors.pydantic.dev/2.8/v/missing'}] 2024-08-30T21:49:47.879023904Z: [ERROR] WARNING:root:[{'type': 'missing', 'loc': ('service',), 'msg': 'Field required', 'input': {'top_k': '5', 'strictness': '3', 'enable_in_domain': 'false', 'use_semantic_search': 'false'}, 'url': 'https://errors.pydantic.dev/2.8/v/missing'}, {'type': 'missing', 'loc': ('index',), 'msg': 'Field required', 'input': {'top_k': '5', 'strictness': '3', 'enable_in_domain': 'false', 'use_semantic_search': 'false'}, 'url': 'https://errors.pydantic.dev/2.8/v/missing'}] 2024-08-30T21:49:47.879032605Z: [ERROR] WARNING:root:No datasource configuration found in the environment -- calls will be made to Azure OpenAI without grounding data. 2024-08-30T21:49:47.879038405Z: [ERROR] WARNING:root:[{'type': 'missing', 'loc': ('service',), 'msg': 'Field required', 'input': {'top_k': '5', 'strictness': '3', 'enable_in_domain': 'false', 'use_semantic_search': 'false'}, 'url': 'https://errors.pydantic.dev/2.8/v/missing'}, {'type': 'missing', 'loc': ('index',), 'msg': 'Field required', 'input': {'top_k': '5', 'strictness': '3', 'enable_in_domain': 'false', 'use_semantic_search': 'false'}, 'url': 'https://errors.pydantic.dev/2.8/v/missing'}] 2024-08-30T21:49:48.170732758Z: [ERROR] [2024-08-30 21:49:48 +0000] [73] [INFO] Started server process [73] 2024-08-30T21:49:48.170775561Z: [ERROR] [2024-08-30 21:49:48 +0000] [75] [INFO] Started server process [75] 2024-08-30T21:49:48.170781661Z: [ERROR] [2024-08-30 21:49:48 +0000] [75] [INFO] Waiting for application startup. 2024-08-30T21:49:48.170786161Z: [ERROR] [2024-08-30 21:49:48 +0000] [73] [INFO] Waiting for application startup. 2024-08-30T21:49:48.170791062Z: [ERROR] [2024-08-30 21:49:48 +0000] [75] [INFO] Application startup

pedropberger commented 2 months ago

Same problem here, only the resource group isn't created in the same region, and I don't think I have permission to change it.

Rmrak commented 2 months ago

Has anyone debugged the issue with deploying web app, i still have this problem "Web App deployment failed InvalidTemplate: Deployment template validation failed: 'The value for the template parameter 'azureOpenAIEmbeddingEndpoint' at line '1' and column '5094' is not provided. Please see https://aka.ms/arm-create-parameter-file for usage details.'."

titanlogic commented 2 months ago

I'm having the same issue, very frustrating.

guyyardeni commented 2 months ago

Same issue, tried in both new and old interface and all objects are in the same region.

mikemishal commented 2 months ago

I am having the same issue with new and old interface.

akjaineusanuj commented 2 months ago

I am running into the same issue. I tried with various locations, including EastUS or EastUS2, with combinations of RGs in different ones. Looks like something changed since last week as I was able to deploy. I also tried the old/new look with the same issue "azureOpenAIEmbeddingEndpoint is not provided" Can someone from Microsoft comment and get this fixed, please? Thank you

2gad commented 2 months ago

I could not take photos as this was on my work laptop but I was facing the same issue and was able to deploy by doing the following:

I was also able to verify from the environment variables of my Web App that the deployment was indeed updated (was upgrading from gpt3 to 4-mini)

I have all my services in East US except my data source (using Azure AI search) which is in West US

akjaineusanuj commented 2 months ago

wow! The deployment worked using the postman trick with put/bearer token and modifying the "azureOpenAIEmbeddingEndpoint" : {} to "azureOpenAIEmbeddingEndpoint" : { "value":""} . I got a 201 as well. Thank you so so much.

tatsuyalkameda commented 2 months ago

I tried a similar workaround as follows:

  1. Copy the failed POST request using the "Copy > Copy as cURL (bash)" option in Chrome's developer tools.
  2. Modify the copied cURL command as described above.
  3. Open the Azure Portal, launch the Cloud Shell in bash, paste the modified command, and run it.

However, I received the following error:

"error":{ "code":"InvalidTemplateDeployment", ... ,"details":[{"code":"ValidationForResourceFailed","message":"Validation failed for a resource. Check 'Error.Details[0]' for more information.","details":[{"code":"SubscriptionIsOverQuotaForSku","message":"This region has quota of 0 instances for your subscription. Try selecting different region or SKU." ...

I'm not sure which part of the settings is causing this issue. Does anyone have any ideas on how to fix or work around this?

2gad commented 2 months ago

Did anyone try today? Is it fixed?

2gad commented 2 months ago

I tried a similar workaround as follows:

  1. Copy the failed POST request using the "Copy > Copy as cURL (bash)" option in Chrome's developer tools.
  2. Modify the copied cURL command as described above.
  3. Open the Azure Portal, launch the Cloud Shell in bash, paste the modified command, and run it.

However, I received the following error:

"error":{ "code":"InvalidTemplateDeployment", ... ,"details":[{"code":"ValidationForResourceFailed","message":"Validation failed for a resource. Check 'Error.Details[0]' for more information.","details":[{"code":"SubscriptionIsOverQuotaForSku","message":"This region has quota of 0 instances for your subscription. Try selecting different region or SKU." ...

I'm not sure which part of the settings is causing this issue. Does anyone have any ideas on how to fix or work around this?

unfortunately I have not seen this before - I would suggest checking the request body is complete

gaborvar commented 2 months ago

Just checked again and failed with the same message "InvalidTemplate: Deployment template validation failed: 'The value for the template parameter 'azureOpenAIEmbeddingEndpoint' at line '1' and column '8426'"... Last and only time it worked for me was on Aug 30 16:40 UTC but I was not able to repeat deployment since then. Tried several combinations of RG, location, new and earlier Studio UI etc. The working deployment from Aug 30 has these locations: Web app: North Europe RG: North Europe Azure OpenAI: West Europe Azure AI Services: West Europe

CStark-1 commented 2 months ago

Is this error likely to be resolved or is it worth just using the above workarounds going forward? Seems like an unnecessary amount of steps for a new process.

gaborvar commented 2 months ago

Is this error likely to be resolved or is it worth just using the above workarounds going forward? Seems like an unnecessary amount of steps for a new process.

There are other potential workarounds that bypass the AzureOAI Studio deployment template. I experimented with the RM template based deployment that is invoked with a click on the "Deploy to Azure" icon in the Readme. Unfortunately it has its own bugs: the temperature and top_p are typed int instead of float (mismatching the type in the Python code), and the UI customization is apparently out of scope. A documentation link is broken in the relevant section of the Readme.

Besides, not as straightforward as the template sniffing and rectification approach discussed above. I wonder if the RM template based deployment method is worth fixing or alternatives are recommended, e.g. CLI ?

2gad commented 2 months ago

Is this error likely to be resolved or is it worth just using the above workarounds going forward? Seems like an unnecessary amount of steps for a new process.

I can't imagine they won't fix it - probably they just don't know about it.. Not sure how to even report it lol

2gad commented 2 months ago

https://github.com/microsoft/sample-app-aoai-chatGPT/discussions/1085

If everyone can upvote this discussion it could help lol! need this fixed asap

sarah-widder commented 2 months ago

Hi all, the template validation error in the playground deployment flow is a known issue with a fix underway. Apologies for the inconvenience. In the meantime deploying from this repo with the 'deploy to azure' button or the azure CLI are possible workarounds.

ouhaddaOualid commented 2 months ago

i used the postman trick and got this error ; this is the error for now : The template deployment failed with error: 'Authorization failed for template resource '22a25cd7-ed25-5eff-8929-38a526b663dc' of type 'Microsoft.Authorization/roleAssignments'. The client 'OfekProduction@caesarea.com' with object id '6ee952df-0c71-466c-a8f6-174d3b5a2287' does not have permission to perform action 'Microsoft.Authorization/roleAssignments/write' at scope '/subscriptions/85902c28-eff5-423a-b460-f53331149 .... what permissions i need for this ?

CStark-1 commented 2 months ago

Appears to be fixed.

jschmHoBa commented 2 months ago

not fixed for me testing 5 minutes ago in the new Azure AI Studio Env. (All resources set to "West Europe")

gaborvar commented 2 months ago

Appears to be fixed.

No change on my side, unfortunately. I tried with a few combinations of location, RG etc. My successful deployments in the past 10 days were all independent of the Studio.

I also tried the az webapp CLI based deployment as workaround and it works. Not a direct replacement however, but offers more control.

sarah-widder commented 2 months ago

@jschmHoBa @gaborvar the fix is making its way to all environments. For now, I believe it is fixed in Azure OpenAI studio, if you use the "old view".

tatsuyalkameda commented 2 months ago

Yes, it seems like the bug has been fixed, and the command modification workaround is no longer necessary.

However, I am now directly getting the following error when using the deploy button. This indicates that while the workaround mentioned in my previous post was correct, there are still some issues in my environment.

Any suggestions to fix this?

SubscriptionIsOverQuotaForSku: This region has quota of 0 instances for your subscription. Try selecting different region or SKU.

gaborvar commented 2 months ago

@jschmHoBa @gaborvar the fix is making its way to all environments. For now, I believe it is fixed in Azure OpenAI studio, if you use the "old view".

It works, thank you! (West Europe location, new OpenAI Studio)

github-actions[bot] commented 1 week ago

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

bmerkle commented 6 days ago

this can be closed