# AspireAzureOpenAIClientBuilder Constructors

- Package: [Aspire.Azure.AI.OpenAI](/reference/api/csharp/aspire.azure.ai.openai.md)
- Type: [AspireAzureOpenAIClientBuilder](/reference/api/csharp/aspire.azure.ai.openai/aspireazureopenaiclientbuilder.md)
- Kind: `Constructors`
- Members: `1`

A builder for configuring an `OpenAI.AzureOpenAIClient` service registration. Constructs a new instance of [AspireAzureOpenAIClientBuilder](/reference/api/csharp/aspire.azure.ai.openai/aspireazureopenaiclientbuilder.md).

## AspireAzureOpenAIClientBuilder(IHostApplicationBuilder, string, string?, bool, bool)

- Name: `Constructor(IHostApplicationBuilder, string, string?, bool, bool)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Components/Aspire.Azure.AI.OpenAI/AspireAzureOpenAIClientBuilder.cs#L20)

A builder for configuring an `OpenAI.AzureOpenAIClient` service registration. Constructs a new instance of [AspireAzureOpenAIClientBuilder](/reference/api/csharp/aspire.azure.ai.openai/aspireazureopenaiclientbuilder.md).

```csharp
public class AspireAzureOpenAIClientBuilder
{
    public AspireAzureOpenAIClientBuilder(
        IHostApplicationBuilder hostBuilder,
        string connectionName,
        string? serviceKey,
        bool disableTracing,
        bool enableSensitiveTelemetryData)
    {
        // ...
    }
}
```

## Parameters

- `hostBuilder` (`IHostApplicationBuilder`)
  The `Hosting.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 `OpenAI.AzureOpenAIClient` service, if any.
- `disableTracing` (`bool`)
  A flag to indicate whether tracing should be disabled.
- `enableSensitiveTelemetryData` (`bool`)
  A flag indicating whether potentially sensitive information should be included in telemetry.
