Text to image {Azure}OpenAI connectors:
AzureOpenAI SDK v2 allows the specification of image style (Vivid & Natural) and image quality (High & Standard) when generating an image from text.:
internal async Task<string> GenerateImageAsync(
string prompt,
int width,
int height,
CancellationToken cancellationToken)
{
...
var imageOptions = new ImageGenerationOptions()
{
Size = size,
ResponseFormat = GeneratedImageFormat.Uri,
Quality = GeneratedImageQuality.High, // It's not supported by SK yet.
Style = GeneratedImageStyle.Vivid, // It's not supported by SK yet.
};
...
}
Chat completion {Azure}OpenAI connectors:
AzureOpenAI SDK v2 allows the specification of image detail level (Low, High, and Auto) when sending an image to the model:
private static ChatMessageContentPart GetImageContentItem(ImageContent imageContent)
{
...
return ChatMessageContentPart.CreateImageMessageContentPart(
BinaryData.FromBytes(data),
imageContent.MimeType,
ImageChatMessageContentPartDetail.Auto); // It's not supported by SK yet.
...
}
ToDo:
Consider extending the SK public API surface to support the options mentioned above.
Notes
Decide whether the support should be shipped as part of the Azure OpenAI v2 migration initiative or afterward.
Context:
Text to image {Azure}OpenAI connectors: AzureOpenAI SDK v2 allows the specification of image style (Vivid & Natural) and image quality (High & Standard) when generating an image from text.:
Chat completion {Azure}OpenAI connectors: AzureOpenAI SDK v2 allows the specification of image detail level (Low, High, and Auto) when sending an image to the model:
ToDo: Consider extending the SK public API surface to support the options mentioned above.
Notes Decide whether the support should be shipped as part of the Azure OpenAI v2 migration initiative or afterward.