HTTP/1.1 404 Resource Not Found


I am getting this error when trying to prompt Azure OpenAI:

HTTP Request: POST hxxps:// “HTTP/1.1 404 Resource Not Found”

Below is my code:

from langchain_openai import AzureOpenAI
from langchain_community.utilities import Requests

os.environ[‘OPENAI_API_VERSION’] = “2023-07-01-preview”
os.environ[‘AZURE_OPENAI_ENDPOINT’] = “hxxps://”

llm = AzureOpenAI(model_name=“text-davinci-003”, max_tokens=700)


Please help me fix the issue.

With Azure, you must deploy a specific model and include a deployment ID as model in the API call.

It is unlikely that you have maintained access to text-davinci-003, as it was shut off for new deployments like last July.

1 Like

Thank you for responding.

I got the key and model from my team. I’ll check with them about deploying a specific model.