OkGoDoIt / OpenAI-API-dotnet

An unofficial C#/.NET SDK for accessing the OpenAI GPT-3 API
https://www.nuget.org/packages/OpenAI/
Other
1.86k stars 430 forks source link

ImageGeneration endpoint url returns 404 when using Azure #165

Open grankko opened 1 year ago

grankko commented 1 year ago

I'm getting this error when trying to do image generation:

Error at images/generations (https://<resource-name>.openai.azure.com/openai/deployments/<deployment-name>/images/generations?api-version=2023-06-01-preview) with HTTP status code: NotFound.

I think the /deployments/<deployment-name> part of the URL might mess it up when doing image generation on an Azure endpoint.

tahsinuysal commented 1 year ago
api.ApiVersion = "2023-06-01-preview";
api.ApiUrlFormat = "https://<resource-name>.openai.azure.com/openai/{1}:submit?api-version={0}";  

correct format is this. but still image result returns null.