Share via


AspireAzureOpenAIClientBuilder Constructor

Definition

A builder for configuring an AzureOpenAIClient service registration. Constructs a new instance of AspireAzureOpenAIClientBuilder.

public AspireAzureOpenAIClientBuilder(Microsoft.Extensions.Hosting.IHostApplicationBuilder hostBuilder, string connectionName, string? serviceKey, bool disableTracing);
new Aspire.Azure.AI.OpenAI.AspireAzureOpenAIClientBuilder : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * string * bool -> Aspire.Azure.AI.OpenAI.AspireAzureOpenAIClientBuilder
Public Sub New (hostBuilder As IHostApplicationBuilder, connectionName As String, serviceKey As String, disableTracing As Boolean)

Parameters

hostBuilder
IHostApplicationBuilder

The IHostApplicationBuilder with which services are being registered.

connectionName
String

The name used to retrieve the connection string from the ConnectionStrings configuration section.

serviceKey
String

The service key used to register the AzureOpenAIClient service, if any.

disableTracing
Boolean

A flag to indicate whether tracing should be disabled.

Applies to