Skip to content
Docs Try Aspire

OpenAISettings Properties

Class Properties 5 members
The settings relevant to accessing OpenAI.
Gets or sets a boolean value that indicates whether the OpenTelemetry metrics are enabled or not.
public bool DisableMetrics { get; set; }
Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.
public bool DisableTracing { get; set; }
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 OpenAI REST API endpoint. Leave empty to connect to OpenAI, or set it to use a service using an API compatible with OpenAI.
public Uri? Endpoint { get; set; }
Key Section titled Key nullable string?
Gets or sets a the API key to used to authenticate with the service.
public string? Key { get; set; }