diff --git a/src/Components/Aspire.Azure.AI.OpenAI/AspireAzureOpenAIChatClientExtensions.cs b/src/Components/Aspire.Azure.AI.OpenAI/AspireAzureOpenAIChatClientExtensions.cs index ee52489daf..06c1fb74df 100644 --- a/src/Components/Aspire.Azure.AI.OpenAI/AspireAzureOpenAIChatClientExtensions.cs +++ b/src/Components/Aspire.Azure.AI.OpenAI/AspireAzureOpenAIChatClientExtensions.cs @@ -17,7 +17,7 @@ namespace Microsoft.Extensions.Hosting; /// public static class AspireAzureOpenAIChatClientExtensions { - private const string DeployentKey = "Deployment"; + private const string DeploymentKey = "Deployment"; private const string ModelKey = "Model"; /// @@ -64,19 +64,19 @@ private static string GetRequiredDeploymentName(IConfiguration configuration, st if (configuration.GetConnectionString(connectionName) is string connectionString) { var connectionBuilder = new DbConnectionStringBuilder { ConnectionString = connectionString }; - deploymentName = (connectionBuilder[DeployentKey] ?? connectionBuilder[ModelKey])?.ToString(); + deploymentName = (connectionBuilder[DeploymentKey] ?? connectionBuilder[ModelKey])?.ToString(); } var configurationSectionName = AspireAzureOpenAIExtensions.DefaultConfigSectionName; if (string.IsNullOrEmpty(deploymentName)) { var configSection = configuration.GetSection(configurationSectionName); - deploymentName = configSection[DeployentKey]; + deploymentName = configSection[DeploymentKey]; } if (string.IsNullOrEmpty(deploymentName)) { - throw new InvalidOperationException($"An {nameof(IChatClient)} could not be configured. Ensure a '{DeployentKey}' or '{ModelKey}' value is provided in 'ConnectionStrings:{connectionName}', or specify a '{DeployentKey}' in the '{configurationSectionName}' configuration section, or specify a '{nameof(deploymentName)}' in the call to {nameof(AddAzureOpenAIChatClient)}."); + throw new InvalidOperationException($"An {nameof(IChatClient)} could not be configured. Ensure a '{DeploymentKey}' or '{ModelKey}' value is provided in 'ConnectionStrings:{connectionName}', or specify a '{DeploymentKey}' in the '{configurationSectionName}' configuration section, or specify a '{nameof(deploymentName)}' in the call to {nameof(AddAzureOpenAIChatClient)}."); } return deploymentName;