Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.17k stars 4.53k forks source link

GetImageGenerationsAsync not defaulting to dall-e-2 as documentation suggestions and api is unusable in current state. #40949

Open MadJohnny opened 6 months ago

MadJohnny commented 6 months ago

https://github.com/Azure/azure-sdk-for-net/blob/5c9c4b9c69185fd08567c2a78d8d715aeabb6cda/sdk/openai/Azure.AI.OpenAI/src/Custom/OpenAIClient.cs#L657C13-L657C13

I'm migrating from raw http calls to the OpenAI endpoints to the Azure OpenAI SDK nuget package version beta-12.

According to all the docs, dall2/dalle-2/dall-e-2 are defaults for this endpoint, but if I don't supply the DeploymentName in my ImageGenerationOptions object, the line above is throwing. If I provide any of the following values for the DeploymentName, the service throws an exception stating the model isn't deployed: dalle dall-e dalle-2 dall-e-2 dalle-3 dall-e-3

var imageGenerations = await openAIClient.GetImageGenerationsAsync( new ImageGenerationOptions() { Prompt = ImageDescription, Size = ImageSize.Size1024x1024, //DeploymentName = "dall-e-2" }); These two combined are making this api unusable for anyone I would think, Screenshots attached. Screenshot 2024-01-02 111233 Screenshot 2024-01-02 111139 Screenshot 2024-01-02 105145 Screenshot 2024-01-02 105003 Screenshot 2024-01-02 104732 Screenshot 2024-01-02 103806

github-actions[bot] commented 6 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jpalvarezl @trrwilson.

github-actions[bot] commented 6 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jpalvarezl @trrwilson.

MadJohnny commented 6 months ago

Not sure if it helps but I had already opened a case from the Azure portal and the engineers were able to repro with beta-12 while beta-6 works as expected. The tracking id for the case is: TrackingID#2401020040000090