.NET API
OpenAIImageBuilderExtensions
Namespace Tracon · Assembly
Tracon.OpenAI.dllAdds OpenAI image generation to the Tracon chain.
public static class OpenAIImageBuilderExtensions- Inheritance
- object ← OpenAIImageBuilderExtensions
- Inherited Members
- object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
Section titled “Methods”UseOpenAIImages(ITraconBuilder, Action<TraconImageOptions>?)
Section titled “ UseOpenAIImages(ITraconBuilder, Action<TraconImageOptions>?)”Registers the OpenAI image generator.
public static ITraconBuilder UseOpenAIImages(this ITraconBuilder builder, Action<TraconImageOptions>? configure = null)Parameters
Section titled “Parameters”builder ITraconBuilder
The Tracon chain.
configure Action<TraconImageOptions>?
Optional image-tool settings.
Returns
Section titled “Returns”The continuation of the chain.
Remarks
Section titled “Remarks”Call OpenAIProviderExtensions.UseOpenAI
first. This call shares the authenticated OpenAI client that UseOpenAI
registers and does not add a package or a second connection pool.
The generate_image tool stays absent until
TraconImageOptions.Enabled is true. Registering this
generator alone does not expose a paid capability to agents.
builder.AddTracon() .UseOpenAI(builder.Configuration["OpenAI:ApiKey"]!) .UseOpenAIImages(options => { options.Enabled = true; options.Model = "gpt-image-1"; });