You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChatClientBuilder now has the following overloads:
public ChatClientBuilder Use(Func<IChatClient, IChatClient> clientFactory)
public ChatClientBuilder Use(Func<IServiceProvider, IChatClient, IChatClient> clientFactory)
Shouldn't the order of IServiceProvider and IChatClient be swapped in the second one? Effectively the IServiceProvider is an optional argument to the factory delegate, and such arguments typically come later than the required ones. I realize there are other components in the DI ecosystem that accept the args in this order, but that feels wrong to me, too.
Having services go first was a continuation of DI patterns we have elsewhere. But I agree that it's odd in this case and would be more satisfactory to have the optional param last.
ChatClientBuilder now has the following overloads:
Shouldn't the order of IServiceProvider and IChatClient be swapped in the second one? Effectively the IServiceProvider is an optional argument to the factory delegate, and such arguments typically come later than the required ones. I realize there are other components in the DI ecosystem that accept the args in this order, but that feels wrong to me, too.
Same for the embedding generator.
cc: @SteveSandersonMS
The text was updated successfully, but these errors were encountered: