azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

Error: The API deployment for this resource does not exist.

Open phosseini opened this issue 1 year ago • 1 comments

I completed running the azd up command without any errors and looks like my app is deployed successfully. However, I keep getting the following error (It's been a while since I completed the deployment, but I still get the error.) Any idea what causes this error?

Error: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.
Screenshot 2023-07-06 at 10 10 22 PM

azd version?

azd version 1.0.2 (commit 145e046b1ea9394bd4e1b1d539eb32e860d692fb)

PS. I came across this issue too, but I can't still figure out how to solve the problem.

phosseini avatar Jul 07 '23 05:07 phosseini

This is probably related to:

#388

OpenAI has removed text-davinci-003 and all other text-davinci models from the OpenAI-Studio. You can see all currently supported models here:

https://learn.microsoft.com/en-us/azure/cognitive-services/openai/concepts/models#model-summary-table-and-region-availability

For a quick fix, according to #388 this is might be a solution:

Another workaround for folks who already have the davinci model deployed:

    1. Go into infra/main.bicep

    2. Delete the first deployment in the deployments property:



      {
        name: gptDeploymentName
        model: {
          format: 'OpenAI'
          name: gptModelName
          version: '1'
        }
        sku: {
          name: 'Standard'
          capacity: gptDeploymentCapacity
        }
      }

Or you just change this parameter in ./infra/main.bicep param gptModelName string = 'text-davinci-003' to param gptModelName string = 'gpt-35-turbo'

and change the "version" in

      {
        name: gptDeploymentName
        model: {
          format: 'OpenAI'
          name: gptModelName
          version: '1'
        }
        sku: {
          name: 'Standard'
          capacity: gptDeploymentCapacity
        }
      }

to either 0301 or 0613 (depending on your region, one of these versions of gpt-35-turbo are available).

fakoe avatar Jul 07 '23 11:07 fakoe

@fakoe Yup! Problem solved.

phosseini avatar Jul 08 '23 06:07 phosseini

I am using existing OpenAI service. Can you tell me how to fix the error.

namratam30 avatar Sep 18 '23 14:09 namratam30

If you are getting an error like this, it is probably due to the deployment ID not being specified correctly. I recommend enabling debug logging (see the FAQ in the README about logging) which will show you what URL OpenAI tries to reach, and then you can compare that URL to what the Azure studio shows.

pamelafox avatar Sep 18 '23 16:09 pamelafox