OpenAITextToImageService Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- apiKey
- String
OpenAI API key, see https://platform.openai.com/account/api-keys
- 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.