# AspireChatCompletionsClientBuilder Constructors

- Package: [Aspire.Azure.AI.Inference](/reference/api/csharp/aspire.azure.ai.inference.md)
- Type: [AspireChatCompletionsClientBuilder](/reference/api/csharp/aspire.azure.ai.inference/aspirechatcompletionsclientbuilder.md)
- Kind: `Constructors`
- Members: `1`

Provides a builder for configuring and integrating an Aspire Chat Completions client into a host application.

## AspireChatCompletionsClientBuilder(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.Inference/AspireChatCompletionsClientBuilder.cs#L20-L50)

Provides a builder for configuring and integrating an Aspire Chat Completions client into a host application.

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

## Parameters

- `hostBuilder` (`IHostApplicationBuilder`)
  The `Hosting.IHostApplicationBuilder` with which services are being registered.
- `serviceKey` (`string?`)
  The service key used to register the `Inference.ChatCompletionsClient` service, if any.
- `deploymentName` (`string?`)
  The name of the deployment in Azure AI Foundry.
- `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.

## Remarks

This class is used to configure the necessary parameters for creating an Aspire Chat Completions client, such as the host application builder, service key, and optional model ID. It is intended for internal use within the application setup process.
