Skip to content
Tracon

AzureOpenAIImageBuilderExtensions

Namespace Tracon · Assembly Tracon.Azure.dll

Adds Azure OpenAI image generation to the Tracon chain.

public static class AzureOpenAIImageBuilderExtensions

objectAzureOpenAIImageBuilderExtensions

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

UseAzureOpenAIImages(ITraconBuilder, Action<TraconImageOptions>?)

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

Registers the Azure OpenAI image generator.

public static ITraconBuilder UseAzureOpenAIImages(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 AzureOpenAIProviderExtensions.UseAzureOpenAI first. The image model is an Azure deployment name, not a public model id.

builder.AddTracon()
.UseAzureOpenAI(
new Uri(builder.Configuration["AzureOpenAI:Endpoint"]!),
builder.Configuration["AzureOpenAI:ApiKey"]!)
.UseAzureOpenAIImages(options =>
{
options.Enabled = true;
options.Model = "image-deployment";
});