diff --git a/src/Plugins/BotSharp.Plugin.AzureOpenAI/Providers/Image/ImageCompletionProvider.Generation.cs b/src/Plugins/BotSharp.Plugin.AzureOpenAI/Providers/Image/ImageCompletionProvider.Generation.cs index eeda728ba..dc2de8074 100644 --- a/src/Plugins/BotSharp.Plugin.AzureOpenAI/Providers/Image/ImageCompletionProvider.Generation.cs +++ b/src/Plugins/BotSharp.Plugin.AzureOpenAI/Providers/Image/ImageCompletionProvider.Generation.cs @@ -45,7 +45,7 @@ public async Task GetImageGeneration(Agent agent, RoleDialogMod GeneratedImages = generatedImages }; - return responseMessage; + return await Task.FromResult(responseMessage); } private (string, int, ImageGenerationOptions) PrepareOptions(RoleDialogModel message) diff --git a/src/Plugins/BotSharp.Plugin.OpenAI/Providers/Image/ImageCompletionProvider.Variation.cs b/src/Plugins/BotSharp.Plugin.OpenAI/Providers/Image/ImageCompletionProvider.Variation.cs index a95097bf8..0233bad4e 100644 --- a/src/Plugins/BotSharp.Plugin.OpenAI/Providers/Image/ImageCompletionProvider.Variation.cs +++ b/src/Plugins/BotSharp.Plugin.OpenAI/Providers/Image/ImageCompletionProvider.Variation.cs @@ -10,7 +10,7 @@ public async Task GetImageVariation(Agent agent, RoleDialogMode var (imageCount, options) = PrepareOptions(); var imageClient = client.GetImageClient(_model); - var response = await imageClient.GenerateImageVariationsAsync(image, imageFileName, imageCount, options); + var response = imageClient.GenerateImageVariations(image, imageFileName, imageCount, options); var values = response.Value; var generatedImages = new List();