25 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> 41Action<AzureOpenAISettings>? configureSettings = null, 47var settings = new OpenAIComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName, serviceKey: null); 63/// <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> 70Action<AzureOpenAISettings>? configureSettings = null, 76var settings = new OpenAIComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName: name, serviceKey: name); 85private sealed class OpenAIComponent : AzureComponent<AzureOpenAISettings, AzureOpenAIClient, AzureOpenAIClientOptions> 94AzureClientFactoryBuilder azureFactoryBuilder, AzureOpenAISettings settings, string connectionName, 101throw 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."); 127protected override void BindSettingsToConfiguration(AzureOpenAISettings settings, IConfiguration config) 132protected override IHealthCheck CreateHealthCheck(AzureOpenAIClient client, AzureOpenAISettings settings) 137protected override bool GetHealthCheckEnabled(AzureOpenAISettings settings) 142protected override TokenCredential? GetTokenCredential(AzureOpenAISettings settings) 145protected override bool GetMetricsEnabled(AzureOpenAISettings settings) 148protected override bool GetTracingEnabled(AzureOpenAISettings settings)
AssemblyInfo.cs (1)
8[assembly: ConfigurationSchema("Aspire:Azure:AI:OpenAI", typeof(AzureOpenAISettings))]
Aspire.Azure.AI.OpenAI.Tests (8)
AspireAzureAIOpenAIExtensionsTests.cs (2)
212AzureOpenAISettings? capturedSettings = null; 240AzureOpenAISettings? capturedSettings = null;
ConformanceTests.cs (6)
15public class ConformanceTests : ConformanceTests<IChatClient, AzureOpenAISettings> 64protected override void RegisterComponent(HostApplicationBuilder builder, Action<AzureOpenAISettings>? configure = null, string? key = null) 75void ConfigureCredentials(AzureOpenAISettings settings) 99protected override void SetHealthCheck(AzureOpenAISettings options, bool enabled) 102protected override void SetMetrics(AzureOpenAISettings options, bool enabled) 105protected override void SetTracing(AzureOpenAISettings options, bool enabled)