I am facing the same issue as well.I verified the Key and end point ,model name and version several times but it didnt help.May be i need to apply for access as i am using company subscription.
"Resource not found" with using Azure OpenAI in Python
Demo Beinf
0
Reputation points
I have the problem with Azure OpenAI for using in Python.
This is my code:
def azure_ai_responder(self, prompt_template):
openai.api_key = "50***********************6"
openai.api_base = "https://b***f.openai.azure.com/"
openai.api_type = 'azure'
openai.api_version = '2024-05-13'
deployment_name = 'beinf-gpt-4o'
print('Sending a test completion job')
start_phrase = 'Write a tagline for an ice cream shop. '
response = openai.Completion.create(
engine=deployment_name,
prompt=start_phrase,
max_tokens=5
)
return response['choices'][0]['message']['content']
And I have the error:
openai.error.InvalidRequestError: Resource not found
I used openai version - 0.28.0