diff --git a/src/libs/Anthropic/Anthropic.csproj b/src/libs/Anthropic/Anthropic.csproj index a3486c4..65cbe5b 100644 --- a/src/libs/Anthropic/Anthropic.csproj +++ b/src/libs/Anthropic/Anthropic.csproj @@ -1,7 +1,8 @@ - netstandard2.0;net4.6.2;net6.0;net7.0 + netstandard2.0;net4.6.2;net6.0;net7.0;net8.0 + $(NoWarn);CA1307 diff --git a/src/libs/Anthropic/AnthropicApi.Constructors.cs b/src/libs/Anthropic/AnthropicApi.Constructors.cs index 02e2890..aaac424 100755 --- a/src/libs/Anthropic/AnthropicApi.Constructors.cs +++ b/src/libs/Anthropic/AnthropicApi.Constructors.cs @@ -1,4 +1,6 @@ -namespace Anthropic; +using System.Net.Http; + +namespace Anthropic; /// /// Class providing methods for API access. diff --git a/src/libs/Anthropic/AnthropicApi.Streaming.cs b/src/libs/Anthropic/AnthropicApi.Streaming.cs index 826fefd..cdc4794 100755 --- a/src/libs/Anthropic/AnthropicApi.Streaming.cs +++ b/src/libs/Anthropic/AnthropicApi.Streaming.cs @@ -1,4 +1,5 @@ -using System.Net.Http.Headers; +using System.Net.Http; +using System.Net.Http.Headers; using System.Runtime.CompilerServices; namespace Anthropic; @@ -92,7 +93,7 @@ public virtual async IAsyncEnumerable CreateCompl continue; } - var index = line.IndexOf("{", StringComparison.Ordinal); + var index = line.IndexOf('{'); if (index >= 0) { line = line[index..];