# AspireOpenAIClientBuilder

- Kind: `class`
- Package: [Aspire.OpenAI](/reference/api/csharp/aspire.openai.md)
- Version: `13.3.0-preview.1.26254.5`
- Namespace: `Aspire.OpenAI`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Components/Aspire.OpenAI/AspireOpenAIClientBuilder.cs)

A builder for configuring an `OpenAIClient` service registration. Constructs a new instance of [AspireOpenAIClientBuilder](/reference/api/csharp/aspire.openai/aspireopenaiclientbuilder.md).

## Definition

```csharp
namespace Aspire.OpenAI;

public class AspireOpenAIClientBuilder
{
    // ...
}
```

## Constructors

- [AspireOpenAIClientBuilder(IHostApplicationBuilder, string, string?, bool, bool)](/reference/api/csharp/aspire.openai/aspireopenaiclientbuilder/constructors.md#constructor-ihostapplicationbuilder-string-string-bool-bool) -- A builder for configuring an `OpenAIClient` service registration. Constructs a new instance of [AspireOpenAIClientBuilder](/reference/api/csharp/aspire.openai/aspireopenaiclientbuilder.md).

## Properties

- [ConfigurationSectionName](/reference/api/csharp/aspire.openai/aspireopenaiclientbuilder/properties.md#configurationsectionname) : `string` `virtual` `get` -- Gets the name of the configuration section for this component type.
- [ConnectionName](/reference/api/csharp/aspire.openai/aspireopenaiclientbuilder/properties.md#connectionname) : `string` `get` -- Gets the name used to retrieve the connection string from the ConnectionStrings configuration section.
- [DisableTracing](/reference/api/csharp/aspire.openai/aspireopenaiclientbuilder/properties.md#disabletracing) : `bool` `get` -- Gets a flag indicating whether tracing should be disabled.
- [EnableSensitiveTelemetryData](/reference/api/csharp/aspire.openai/aspireopenaiclientbuilder/properties.md#enablesensitivetelemetrydata) : `bool` `get` -- Gets a flag indicating whether potentially sensitive information should be included in telemetry.
- [HostBuilder](/reference/api/csharp/aspire.openai/aspireopenaiclientbuilder/properties.md#hostbuilder) : `IHostApplicationBuilder` `get` -- Gets the `Hosting.IHostApplicationBuilder` with which services are being registered.
- [ServiceKey](/reference/api/csharp/aspire.openai/aspireopenaiclientbuilder/properties.md#servicekey) : `string?` `get` -- Gets the service key used to register the `OpenAIClient` service, if any.
