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.91k stars 4.05k forks source link

Deploying existing openai account: CustomDomainInUse error #1093

Open mattgotteiner opened 8 months ago

mattgotteiner commented 8 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

If I deploy an already existing openai cognitive services account, I see an error similar to the following:

InvalidTemplateDeployment: The template deployment 'openai' is not valid according to the validation procedure. The tracking id is '857a0cad-802d-440b-bea7-87155ea1992b'. See inner errors for details.
CustomDomainInUse: Please pick a different name. The subdomain name 'cog-xxx' is not available as it's already used by a resource. If the resource using the name was deleted in the last 48 hours, you may need to purge the deleted resource. Learn more at "https://go.microsoft.com/fwlink/?linkid=2215493"

Expected/desired behavior

I don't see this error. If I add the following parameter to the openai module the issue goes away

module openAi 'core/ai/cognitiveservices.bicep' = {
  name: 'openai'
  scope: openAiResourceGroup
  params: {
    name: !empty(openAiServiceName) ? openAiServiceName : '${abbrs.cognitiveServicesAccounts}${resourceToken}'
    location: openAiResourceGroupLocation
    tags: tags
    sku: {
      name: openAiSkuName
    }
    deployments: openAiDeployments
    customSubDomainName: ''
  }
}

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) Windows

azd version?

run azd version and copy paste here. 1.5.1


Thanks! We'll be in touch soon.

druidajes commented 4 months ago

Were you able to solve it? I have the same problem and I can't use an existing resource.