Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
5.61k stars 3.76k forks source link

InvalidTemplateDeployment: The template deployment 'openai' is not valid #1406

Open Loo-Ree opened 3 months ago

Loo-Ree commented 3 months ago
- [ X] bug report 
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Download github repo locally
  2. Install all required packages and dependencies
  3. proceed with azd auth login
  4. setup a list of existing resources: azd env set AZURE_RESOURCE_GROUP my-rg azd env set AZURE_LOCATION westeurope azd env set AZURE_OPENAI_SERVICE my-aoai-res azd env set AZURE_OPENAI_RESOURCE_GROUP my-rg-aoai azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT gpt-4 azd env set AZURE_OPENAI_EMB_DEPLOYMENT text-embedding-ada-002 azd env set AZURE_SEARCH_QUERY_LANGUAGE it-IT azd env set AZURE_SEARCH_QUERY_SPELLER none azd env set AZURE_SEARCH_ANALYZER_NAME it.microsoft
  5. run azd up
  6. select correct sub (prompt by azd)
  7. select documentIntelligenceResourceGroupLocation location as westeurope (prompt by azd)
  8. select openAiResourceGroupLocation location as swedencentral (prompt by azd - it should not be required being an existing resource)

Any log messages given by the failure

(✓) Done: Resource group: my-rg (✓) Done: App Service plan: plan-xxx (✓) Done: Log Analytics workspace: log-xxx (✓) Done: Storage account: stxxx (✓) Done: Document Intelligence: cog-di-xxx (✓) Done: Application Insights: appi-xxx (✓) Done: Portal dashboard: dash-xxx (✓) Done: Search service: gptkb-xxx

ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:

Deployment Error Details: InvalidTemplateDeployment: The template deployment 'openai' is not valid according to the validation procedure. The tracking id is 'bffxxx'. See inner errors for details. CannotChangeDeploymentModel: The model of deployment cannot be changed.

TraceID: cc1xxx

ERROR: error executing step command 'provision': deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:

Deployment Error Details: InvalidTemplateDeployment: The template deployment 'openai' is not valid according to the validation procedure. The tracking id is 'bffxxx'. See inner errors for details. CannotChangeDeploymentModel: The model of deployment cannot be changed.

TraceID: cc1xxx

Expected/desired behavior

Successful installation

OS and Version?

Windows 11

azd version?

azd version 1.6.1 (commit eba2c978b5443fdb002c95add4011d9e63c2e76f)

Versions

main

Mention any other details that might be useful

Not the first time that I installed successfully this accelerator, unfortunately this round I was out of luck. Tried several times (after purging all created resources), always ended with this error.


Thanks! We'll be in touch soon.

Loo-Ree commented 3 months ago

I have overcame the issue changing the following parameters in main.bicep: chatGptDeploymentCapacity chatGptModelName chatGptModelVersion using values that I have in my deployment. Still I'm wondering why these checks are in place if I'm providing my own resource? Maybe values should be handled as variables so not to change the main.bicep file? It could be part of the customization docs. Anyway, up to you if you want to close the issue or change it as a feature request. Thanks!