# AspireOpenAIClientBuilder

- Kind: `class`
- Package: [Aspire.OpenAI](/reference/api/csharp/aspire.openai.md)
- Version: `13.4.0-preview.1.26281.18`
- Namespace: `Aspire.OpenAI`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/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.
