openai-python: error_message='Resource not found' for gpt-35-turbo model in Azure OpenAI Service

Describe the bug

It was successfully called via python openai library. But from a few days ago. It returns error_code=404 error_message=‘Resource not found’ error_param=None error_type=None message=‘OpenAI API error received’ stream_error=False.

I am pretty sure that the model deployment is existed since I can still call the endpoint on Postman and get the response. And I also tried to delete and deploy it again in Azure OpenAI service. But still not work on python side.

Is this issue from Microsoft side? or anyone can help me figure out?

To Reproduce

response = openai.ChatCompletion.create(
        engine="NAME of Model Deployment",
        messages=msg,
        temperature=temperature,
        max_tokens=max_tokens,
        top_p=top_p,
        frequency_penalty=frequency_penalty,
        presence_penalty=presence_penalty,
        stop=stop)

Code snippets

No response

OS

macOS

Python version

Python v3.10

Library version

openai-python 0.27.2

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Yes, using ChatCompletions and gpt-35-turbo. API version “2023-03-15-preview”.

@eugene2candy Glad to hear things are working. I will continue to investigate what’s going on with the api_version not getting set in the latest version. It looks like you’re running this in an Azure function, so I’ll try to reproduce this from there. Thanks for the additional context.