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.89k stars 4.03k forks source link

The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI' #114

Open GustavoContreiras opened 1 year ago

GustavoContreiras commented 1 year ago

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

- [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

azd auth login azd up

Any log messages given by the failure

PS C:\dev\azure-search-openai-demo> azd up
? Please enter a new environment name: azure-search-openai-demo
? Please select an Azure Subscription to use:  1. Azure subscription 1 (d798xxxxxxxxxxc0b4f)
? Please select an Azure location to use: 42. (US) East US 2 (eastus2)

Packaging services (azd package)

  |       | Packaging service backendExecuting prepackage hook => C:\Users\GUSTAV~1.CON\AppData\Local\Temp\azd-prepackage-2434810807.ps1

added 121 packages, and audited 122 packages in 17s

10 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
  |     ==| Packaging service backend
> frontend@0.0.0 build
> tsc && vite build

  |=      | Packaging service backendvite v4.1.1 building for production...
✓ 1250 modules transformed.
../backend/static/index.html                    0.49 kB
../backend/static/assets/github-fab00c2d.svg    0.96 kB
../backend/static/assets/index-6b2c2cfa.css     7.46 kB │ gzip:   2.20 kB
../backend/static/assets/index-3d122da9.js    625.76 kB │ gzip: 204.86 kB │ map: 5,057.29 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
  (✓) Done: Packaging service backend
  - Package Output: C:\Users\GUSTAV~1.CON\AppData\Local\Temp\azddeploy856576354.zip

Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time

  (✓) Done: Downloading Bicep
  You can view detailed progress in the Azure Portal:
  https://portal.azure.com/#blade/HubsExtension/DeploymentDetailsBlade/overview/id/%2Fsubscriptions%2Fd7xxxxxxx-32x8-47df-xxxf-b0xxxx65c0b4f%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fazure-search-openai-demo

  (✓) Done: Resource group: rg-xxxxxxxxx
  (✓) Done: Form recognizer: cog-fr-xxxxxxxxxx
  (✓) Done: Storage account: stewxxxnxxxxxez46
  (✓) Done: Search service: gptkb-ewxxxxxxxxz46

ERROR: deployment failed: error deploying infrastructure: failed deploying: deploying to subscription:

Deployment Error Details:
SpecialFeatureOrQuotaIdRequired: The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI' .
Unauthorized: This region has quota of 0 instances for your subscription. Try selecting different region or SKU.
- This region has quota of 0 instances for your subscription. Try selecting different region or SKU.

Expected/desired behavior

Deploy the app in Azure.

OS and Version?

Windows 10

Versions

Mention any other details that might be useful

I'm using a free trial Azure account.

hophanms commented 1 year ago

Did you get your subscription in allow list to deploy Open AI? Try to create it manually in the portal and it shows the same error.

But I am wondering if should be checked upfront.

Samoppakiks commented 1 year ago

I have the same issue

goodvirus136 commented 1 year ago

Same here and I got the subscription allowed and not using a free account

GustavoContreiras commented 1 year ago

Same here and I got the subscription allowed and not using a free account

Maybe you have to create an "Azure OpenAI" in Azure after being allowed:

image

iMicknl commented 1 year ago

See Limited access to Azure OpenAI Service.

Azure OpenAI requires registration and is currently only available to approved enterprise customers and partners. Customers who wish to use Azure OpenAI are required to submit a registration form.

This is also mentioned in the README.

IMPORTANT: In order to deploy and run this example, you'll need an Azure subscription with access enabled for the Azure OpenAI service. You can request access here. You can also visit here to get some free Azure credits to get you started.

goodvirus136 commented 1 year ago

Thanks but I can create an openai ressource so thats not the problem

kylgrn commented 1 year ago

I'm having this same issue. Submitted the registration form and got confirmation that my subscription was enabled for the Open AI service.

kylgrn commented 1 year ago

I believe I figured out the issue. You have to select the region in the script that you defined in the form you submitted to Microsoft. I was choosing EastUS2 and was unable to provision, then remembered I chose EastUS in the form. It now works.

Alec13355 commented 1 year ago

I had the same issue I didn't realize I selected use east 2 and needed us east

pkfuncs commented 1 year ago

The only way I could get around this is delete my already existing OpenAI instance in my Azure portal, then run this container. After that it created OpenAI successfully.

bobbydowling commented 1 year ago

Change SKU from 'S0' to 'S' in main.bicep:

param openAiSkuName string = 'S'

Also need to set network ACL in cognitiveservices.bicep:

image

anniehou-panda commented 1 year ago

Also having this problem, even in the container and having deleted my existing OpenAI Instance. Any solution to this yet?

Problem solved. I had to run

azd env set AZURE_LOCATION="eastus"

in docker container terminal.

matsumoto-mayumi commented 1 year ago

I'm facing the same problem. "azd up" created "rg-azure-search-openai-demo-dev" and succeeded with 11 resources. However, I encountered a failure while trying to create the OpenAI resource. I'm confident that I have the necessary permissions to create OpenAI resources with "S0".

Alec13355 commented 1 year ago

@matsumoto-mayumi confirm your resource group is in the right region. We had the same issue and it was because azd up defaulted to a region that did not have azure open Ai yet. I believe to date there's only 3 regions that support Azure Open AI

matsumoto-mayumi commented 1 year ago

Thanks @Alec13355 ! I was able to resolve this issue. Unfortunately, another problem has occurred, but it seems to be reported as a separate issue, so I will ask my question there.

nhtkid commented 1 year ago

I got the same issue. Fixed it by select "East US" region. I was using "East US 2".

fabiomarcos70 commented 1 year ago

Even after getting approval to create the Openai resource, the script failed.

I did a test by creating an Open AI service through the Azure Portal and it worked.

The difference is that through the Portal I created it in eastus and not in eastus2

So I deleted the resource group and services that had been created, changed the location in the .azure directory's .env file (AZURE_LOCATION="eastus") and ran azd up again and everything worked.

Microsoft is making Open AI available only on EASTUS and not on EASTUS2. Its just update ,env configuration file to the EASTUS location.

tonybaloney commented 1 year ago

When running azd up make sure you pick a region that has Azure OpenAI, those currently are available in the portal when cresting a new service:

screenshot 2023-06-20 at 11 07 11
erg-hzhou commented 1 year ago

I got same issue with demo. Here is how I have solved it so new comers are not wasting their valuable time to debug it. -1. make sure you have signed up Azure OpenAI service -2. Click on GITHUB CODESPACE OPEN -3. Run azd auth login -4. Run azd init -t azure-search-openai-demo -5. Run azd env set AZURE_LOCATION eastus -6. Run azd up (wait for 16 min. in my case)

amtambe commented 9 months ago

What worked for me: Switching from an Azure totally free subscription to an Azure "pay as you go" subscription (even on a Basic level, where there is no monthly subscription fee, and 12 months of credits).

pamelafox commented 7 months ago

It is currently the case that free Azure accounts cannot use Azure OpenAI. If you have a free Azure account, please follow the readme instructions for using OpenAI.com credentials instead.

KristinBethea commented 3 months ago

If we cannot use the free Azure accounts, they should not be an option to select.

techybolek commented 3 months ago

I believe I figured out the issue. You have to select the region in the script that you defined in the form you submitted to Microsoft. I was choosing EastUS2 and was unable to provision, then remembered I chose EastUS in the form. It now works.

Thanks a lot for for this. For the record, I first had to upgrade my subscription to "pay as you go", then set the region. The region I had to guess, because they only asked me about the zip code, not "region" in the registration form. I guess they could easily make it even more difficult.