From d317d71672fb7407c5f2ca5f1e97191e73dca61d Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Fri, 22 Nov 2024 04:59:27 -0500 Subject: [PATCH] feat: Update M.E.AI to 9.0.1-preview.1.24570.5 (#88) --- src/libs/Anthropic/Anthropic.csproj | 2 +- src/libs/Anthropic/Extensions/AnthropicClient.ChatClient.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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)