Open IntegerMan opened 3 months ago
I have now verified this occurs on Windows environments as well as Linux.
I recommend working directly with DALL-E for the time being while this issue is open using Azure.AI.OpenAI
. Assuming you have an AzureOpenAIClient
named azureClient
, use the following code:
var imageClient = azureClient.GetImageClient("your-dall-e-deployment-name");
var imgResult = imageClient.GenerateImage("A picture of a bug in the DALL-E integration");
// Set up a .NET Interactive formatter for OpenAI.Images.GeneratedImage to render the image as HTML
Microsoft.DotNet.Interactive.Formatting.Formatter.Register<OpenAI.Images.GeneratedImage>((image, writer) =>
{
writer.Write($"<img src=\"{image.ImageUri}\" />");
writer.Write($"<p>{image.RevisedPrompt}</p>");
}, "text/html");
imgResult.Value
Describe the bug
Using the image generation notebook hosted at https://github.com/dotnet/interactive/blob/main/samples/notebooks/ai/image%20generation.ipynb I provided my own API key and endpoint pointing to an Azure OpenAI resource in East US. I then updated the deployment name to match my deployed DALL-E-2 or DALL-E-3 instance and ran the notebook with no other changes.
I consistently received the following stack trace trying to generate images:
I suspect something is out-of-date with the AI package, semantic kernel, and / or SK's image generation connectors.
Updating the version of Microsoft.DotNet.Interactive.AI via
*-*
causes the version installed to jump from 1.0.0-beta.23604.2 to 1.0.0-beta.24074.1 but still results in a failure, though with a different stack trace:If it impacts the urgency of this, I was hoping to include this feature in my upcoming book and am prepping to write the chapter on AI in Polyglot Notebooks.
Please complete the following:
Which version of .NET Interactive are you using? 1.0.522904+cdfa48b2ea1a27dfe0f545c42a34fd3ec7119074
Screenshots
If applicable, add screenshots to help explain your problem.