Share via


OpenAITextToImageService Constructor

Definition

Initializes a new instance of the OpenAITextToImageService class.

public OpenAITextToImageService (string apiKey, string? organization = default, string? modelId = default, System.Net.Http.HttpClient? httpClient = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.SemanticKernel.Connectors.OpenAI.OpenAITextToImageService : string * string * string * System.Net.Http.HttpClient * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.Connectors.OpenAI.OpenAITextToImageService
Public Sub New (apiKey As String, Optional organization As String = Nothing, Optional modelId As String = Nothing, Optional httpClient As HttpClient = Nothing, Optional loggerFactory As ILoggerFactory = Nothing)

Parameters

organization
String

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

modelId
String

The model to use for image generation.

httpClient
HttpClient

Custom HttpClient for HTTP requests.

loggerFactory
ILoggerFactory

The ILoggerFactory to use for logging. If null, no logging will be performed.

Applies to