diff --git a/src/libs/Anthropic/Anthropic.csproj b/src/libs/Anthropic/Anthropic.csproj index bb8f778..995e7cb 100644 --- a/src/libs/Anthropic/Anthropic.csproj +++ b/src/libs/Anthropic/Anthropic.csproj @@ -18,7 +18,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/libs/Anthropic/Extensions/AnthropicClient.ChatClient.cs b/src/libs/Anthropic/Extensions/AnthropicClient.ChatClient.cs index 23732e9..c7c748a 100644 --- a/src/libs/Anthropic/Extensions/AnthropicClient.ChatClient.cs +++ b/src/libs/Anthropic/Extensions/AnthropicClient.ChatClient.cs @@ -21,7 +21,10 @@ public partial class AnthropicClient : IChatClient ChatClientMetadata IChatClient.Metadata => _metadata ??= new(nameof(AnthropicClient), this.BaseUri); /// - TService? IChatClient.GetService(object? key) where TService : class => this as TService; + object? IChatClient.GetService(Type serviceType, object? key) + { + return key is null && serviceType?.IsInstanceOfType(this) is true ? this : null; + } async Task IChatClient.CompleteAsync( IList chatMessages, ChatOptions? options, CancellationToken cancellationToken)