Skip to content

Commit

Permalink
Update code and project version.
Browse files Browse the repository at this point in the history
In `ServiceCollectionExtensions.cs`, the order of arguments in `AddChatGptEntityFrameworkIntegration` function is changed. This was done to ensure `optionsAction` is not null before it's used. Also, validation for `optionsAction` is moved right after validating `configuration`.

In `Directory.Build.props`, the version number has been updated from `4.0.0-alpha` to `4.0.1-alpha`. This indicates a minor revision or update in the project.
  • Loading branch information
rodion-m committed Dec 5, 2023
1 parent 78e1ae8 commit 3143add
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>4.0.0-alpha</Version>
<Version>4.0.1-alpha</Version>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public static class ServiceCollectionExtensions
/// </summary>
public static IServiceCollection AddChatGptEntityFrameworkIntegration(
this IServiceCollection services,
Action<DbContextOptionsBuilder> optionsAction,
IConfiguration configuration,
Action<DbContextOptionsBuilder> optionsAction,
string completionsConfigSectionPath = ChatGPTConfigSectionPathDefault,
string credentialsConfigSectionPath = OpenAiCredentialsConfigSectionPathDefault,
string azureOpenAiCredentialsConfigSectionPath = AzureOpenAiCredentialsConfigSectionPathDefault,
Expand All @@ -22,8 +22,8 @@ public static IServiceCollection AddChatGptEntityFrameworkIntegration(
bool validateAiClientProviderOnStart = true)
{
ArgumentNullException.ThrowIfNull(services);
ArgumentNullException.ThrowIfNull(optionsAction);
ArgumentNullException.ThrowIfNull(configuration);
ArgumentNullException.ThrowIfNull(optionsAction);
if (string.IsNullOrWhiteSpace(credentialsConfigSectionPath))
{
throw new ArgumentException("Value cannot be null or whitespace.",
Expand Down

0 comments on commit 3143add

Please sign in to comment.