Skip to content
Tracon

GoogleImageBuilderExtensions

Namespace Tracon · Assembly Tracon.Google.dll

Adds Google image generation to the Tracon chain.

public static class GoogleImageBuilderExtensions

objectGoogleImageBuilderExtensions

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

UseGoogleImages(ITraconBuilder, Action<TraconImageOptions>?)

Section titled “ UseGoogleImages(ITraconBuilder, Action<TraconImageOptions>?)”

Registers the Google image generator.

public static ITraconBuilder UseGoogleImages(this ITraconBuilder builder, Action<TraconImageOptions>? configure = null)

builder ITraconBuilder

The Tracon chain.

configure Action<TraconImageOptions>?

Optional image-tool settings.

ITraconBuilder

The continuation of the chain.

Call GoogleProviderExtensions.UseGoogle first. Google.GenAI has no Microsoft.Extensions.AI image adapter, so this call registers Tracon’s narrow GenerateAsync-only adapter.

builder.AddTracon()
.UseGoogle(builder.Configuration["Google:ApiKey"]!)
.UseGoogleImages(options =>
{
options.Enabled = true;
options.Model = "your-imagen-model";
});