2 instantiations of AzureOpenAISettings
Aspire.Azure.AI.OpenAI.Tests (2)
AzureOpenAISettingsTests.cs (2)
27
Assert.Equal(expectedValue, new
AzureOpenAISettings
().DisableMetrics);
32
Assert.Equal(expectedValue, new
AzureOpenAISettings
().DisableTracing);
23 references to AzureOpenAISettings
Aspire.Azure.AI.OpenAI (17)
AspireAzureOpenAIExtensions.cs (16)
34
/// <param name="configureSettings">An optional method that can be used for customizing the <see cref="
AzureOpenAISettings
"/>. It's invoked after the settings are read from the configuration.</param>
41
Action<
AzureOpenAISettings
>? configureSettings = null,
44
var
settings = new OpenAIComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName, serviceKey: null);
59
/// <param name="configureSettings">An optional method that can be used for customizing the <see cref="
AzureOpenAISettings
"/>. It's invoked after the settings are read from the configuration.</param>
66
Action<
AzureOpenAISettings
>? configureSettings = null,
71
var
settings = new OpenAIComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName: name, serviceKey: name);
79
private sealed class OpenAIComponent : AzureComponent<
AzureOpenAISettings
, AzureOpenAIClient, AzureOpenAIClientOptions>
86
AzureClientFactoryBuilder azureFactoryBuilder,
AzureOpenAISettings
settings, string connectionName,
93
throw new InvalidOperationException($"An OpenAIClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify a '{nameof(
AzureOpenAISettings
.Endpoint)}' or '{nameof(
AzureOpenAISettings
.Key)}' in the '{configurationSectionName}' configuration section.");
119
protected override void BindSettingsToConfiguration(
AzureOpenAISettings
settings, IConfiguration config)
124
protected override IHealthCheck CreateHealthCheck(AzureOpenAIClient client,
AzureOpenAISettings
settings)
129
protected override bool GetHealthCheckEnabled(
AzureOpenAISettings
settings)
134
protected override TokenCredential? GetTokenCredential(
AzureOpenAISettings
settings)
137
protected override bool GetMetricsEnabled(
AzureOpenAISettings
settings)
140
protected override bool GetTracingEnabled(
AzureOpenAISettings
settings)
AssemblyInfo.cs (1)
8
[assembly: ConfigurationSchema("Aspire:Azure:AI:OpenAI", typeof(
AzureOpenAISettings
))]
Aspire.Azure.AI.OpenAI.Tests (6)
ConformanceTests.cs (6)
15
public class ConformanceTests : ConformanceTests<AzureOpenAIClient,
AzureOpenAISettings
>
63
protected override void RegisterComponent(HostApplicationBuilder builder, Action<
AzureOpenAISettings
>? configure = null, string? key = null)
74
void ConfigureCredentials(
AzureOpenAISettings
settings)
93
protected override void SetHealthCheck(
AzureOpenAISettings
options, bool enabled)
96
protected override void SetMetrics(
AzureOpenAISettings
options, bool enabled)
99
protected override void SetTracing(
AzureOpenAISettings
options, bool enabled)