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
6.34k stars 4.24k forks source link

Deployment using existing resources is failing #402

Closed jacobwaller closed 1 year ago

jacobwaller commented 1 year 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. Have a central openAI instance in Azure with GPT 3 davinci and GPT 3.5 configured
  2. Follow the instructions in the readme for using existing resources
  3. azd up

Any log messages given by the failure

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 [guid]. See inner errors for details.
InsufficientQuota: The specified capacity '1' of account deployment is bigger than available capacity '0' for UsageName 'Tokens Per Minute (thousands) - Text-Davinci-003'.

Expected/desired behavior

Deployment is successful & uses the existing Davinci deployment

OS and Version?

Mac M2 Ventura

azd version?

azd version 1.0.2 (commit 145e046b1ea9394bd4e1b1d539eb32e860d692fb)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

pamelafox commented 1 year ago

Could you go into your Azure OpenAI studio and check the capacity of your current deployments?

Screenshot 2023-07-10 at 10 10 24 AM

Usually that error means that your other deployments have too high a capacity, and you need to edit those deployments to have lower capacity.

jacobwaller commented 1 year ago

Hey Pamela! Thanks for the quick response. As far as I can see, we only have the two deployments that I'm trying to use. & I've had someone else check the deleted deployments and we have nothing in there either. Screenshot 2023-07-10 at 12 16 02 PM

Is there anything sticking out here?

pamelafox commented 1 year ago

Well, that gpt35-turbo says its at 120K TPM, so I would suggest editing that down to 30K. You can click it, then select "edit deployment", and move the slider. I know that the deploy should in theory change that to 30K, but I think it doesn't go in the right order for that to happen.

jacobwaller commented 1 year ago

I ended up just removing them from the main bicep file since they already exist as deployed resources. Unfortunately, I don't think this package works very well with existing openAI deployments right now