Partager via


AzureOpenAIServiceCollectionExtensions.AddAzureOpenAITextToImage Method

Definition

Overloads

AddAzureOpenAITextToImage(IServiceCollection, String, AzureOpenAIClient, String, String)

Adds the AzureOpenAITextToImageService to the IServiceCollection.

AddAzureOpenAITextToImage(IServiceCollection, String, String, TokenCredential, String, String, String)

Adds the AzureOpenAITextToImageService to the IServiceCollection.

AddAzureOpenAITextToImage(IServiceCollection, String, String, String, String, String, Int32)

Adds the AzureOpenAITextToImageService to the IServiceCollection.

AddAzureOpenAITextToImage(IServiceCollection, String, AzureOpenAIClient, String, String)

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAzureOpenAITextToImage (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string deploymentName, Azure.AI.OpenAI.AzureOpenAIClient? openAIClient = default, string? modelId = default, string? serviceId = default);
static member AddAzureOpenAITextToImage : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Azure.AI.OpenAI.AzureOpenAIClient * string * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAzureOpenAITextToImage (services As IServiceCollection, deploymentName As String, Optional openAIClient As AzureOpenAIClient = Nothing, Optional modelId As String = Nothing, Optional serviceId As String = Nothing) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection instance to augment.

openAIClient
AzureOpenAIClient

AzureOpenAIClient to use for the service. If null, one must be available in the service provider when this service is resolved.

serviceId
String

A local identifier for the given AI service

Returns

The same instance as services.

Applies to

AddAzureOpenAITextToImage(IServiceCollection, String, String, TokenCredential, String, String, String)

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAzureOpenAITextToImage (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string deploymentName, string endpoint, Azure.Core.TokenCredential credentials, string? modelId = default, string? serviceId = default, string? apiVersion = default);
static member AddAzureOpenAITextToImage : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * Azure.Core.TokenCredential * string * string * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAzureOpenAITextToImage (services As IServiceCollection, deploymentName As String, endpoint As String, credentials As TokenCredential, Optional modelId As String = Nothing, Optional serviceId As String = Nothing, Optional apiVersion As String = Nothing) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection instance to augment.

credentials
TokenCredential

Token credentials, e.g. DefaultAzureCredential, ManagedIdentityCredential, EnvironmentCredential, etc.

serviceId
String

A local identifier for the given AI service

apiVersion
String

Azure OpenAI API version

Returns

The same instance as services.

Applies to

AddAzureOpenAITextToImage(IServiceCollection, String, String, String, String, String, Int32)

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAzureOpenAITextToImage (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string deploymentName, string endpoint, string apiKey, string? serviceId = default, string? modelId = default, int maxRetryCount = 5);
static member AddAzureOpenAITextToImage : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * string * string * string * int -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAzureOpenAITextToImage (services As IServiceCollection, deploymentName As String, endpoint As String, apiKey As String, Optional serviceId As String = Nothing, Optional modelId As String = Nothing, Optional maxRetryCount As Integer = 5) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection instance to augment.

apiKey
String

Azure OpenAI API key

serviceId
String

A local identifier for the given AI service

maxRetryCount
Int32

Maximum number of attempts to retrieve the text to image operation result.

Returns

The same instance as services.

Applies to