Skip to content
Docs Try Aspire

AzureOpenAISettings Properties

Class Properties 6 members
The settings relevant to accessing Azure OpenAI or OpenAI.
Credential Section titled Credential nullable TokenCredential?
Gets or sets the credential used to authenticate to the Azure OpenAI resource.
public TokenCredential? Credential { get; set; }
Gets or sets a boolean value that indicates whether the OpenTelemetry metrics are enabled or not.
public bool DisableMetrics { get; set; }
Telemetry is recorded by Microsoft.Extensions.AI.
Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.
public bool DisableTracing { get; set; }
Telemetry is recorded by Microsoft.Extensions.AI.
EnableSensitiveTelemetryData Section titled EnableSensitiveTelemetryData bool
Gets or sets a boolean value indicating whether potentially sensitive information should be included in telemetry.
public bool EnableSensitiveTelemetryData { get; set; }
By default, telemetry includes metadata, such as token counts, but not raw inputs and outputs, such as message content, function call arguments, and function call results. The default value can be overridden by setting the OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT environment variable to "true". Explicitly setting this property will override the environment variable.
Endpoint Section titled Endpoint nullable Uri?
Gets or sets a Uri referencing the Azure OpenAI endpoint. This is likely to be similar to "https://{account_name}.openai.azure.com".
public Uri? Endpoint { get; set; }
Leave empty and provide a AzureOpenAISettings.Key value to use a non-Azure OpenAI inference endpoint. Used along with AzureOpenAISettings.Credential or AzureOpenAISettings.Key to establish the connection.
Key Section titled Key nullable string?
Gets or sets the key to use to authenticate to the Azure OpenAI endpoint.
public string? Key { get; set; }
When defined it will use an ClientModel.ApiKeyCredential instance instead of AzureOpenAISettings.Credential.