Share via


OpenAIServiceCollectionExtensions.AddOpenAITextToImage Method

Definition

Add the OpenAI Dall-E text to image service to the list

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOpenAITextToImage (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string apiKey, string? orgId = default, string? modelId = default, string? serviceId = default);
static member AddOpenAITextToImage : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * string * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddOpenAITextToImage (services As IServiceCollection, apiKey As String, Optional orgId As String = Nothing, Optional modelId As String = Nothing, Optional serviceId As String = Nothing) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection instance to augment.

orgId
String

OpenAI organization id. This is usually optional unless your account belongs to multiple organizations.

modelId
String

The model to use for image generation.

serviceId
String

A local identifier for the given AI service

Returns

The same instance as services.

Applies to