Skip to content

Commit

Permalink
fix: Fixed #7.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Nov 24, 2023
1 parent fad72bb commit cb7c8c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/libs/Anthropic/Anthropic.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net4.6.2;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net4.6.2;net6.0;net7.0;net8.0</TargetFrameworks>
<NoWarn>$(NoWarn);CA1307</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 3 additions & 1 deletion src/libs/Anthropic/AnthropicApi.Constructors.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Anthropic;
using System.Net.Http;

namespace Anthropic;

/// <summary>
/// Class providing methods for API access.
Expand Down
5 changes: 3 additions & 2 deletions src/libs/Anthropic/AnthropicApi.Streaming.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Net.Http.Headers;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Runtime.CompilerServices;

namespace Anthropic;
Expand Down Expand Up @@ -92,7 +93,7 @@ public virtual async IAsyncEnumerable<CompletionStreamResponseDelta> CreateCompl
continue;
}

var index = line.IndexOf("{", StringComparison.Ordinal);
var index = line.IndexOf('{');
if (index >= 0)
{
line = line[index..];
Expand Down

0 comments on commit cb7c8c7

Please sign in to comment.