[KongchangAI]
ConceptUseImageGeneration()

UseImageGeneration

A middleware extension method in Microsoft.Extensions.AI that adds the ImageGeneratingChatClient middleware, converting the HostedImageGenerationTool marker into real functions callable by the model, such as GenerateImage and EditImage.

Timeline (last 90 days)

Oct 18

The image generation middleware must be located outside the function invocation middleware, otherwise the function invoker receives no executable functions, causing the generator to be called 0 times and the response to contain only ImageGenerationToolCallContent with no image.

Unverified50%
Oct 18

UseImageGeneration() adds the ImageGeneratingChatClient middleware, replacing the HostedImageGenerationTool marker with real functions the model can call: GenerateImage, EditImage, and GetImagesForEdit.

Unverified50%

All Facts (2)

Source Articles