Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Anthropic.SDK.ComputerUse/Anthropic.SDK.ComputerUse.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="SharpHook" Version="5.3.8" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.7" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.11" />
<PackageReference Include="System.Drawing.Common" Version="8.0.11" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions Anthropic.SDK.Tests/Anthropic.SDK.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
<ItemGroup>
<PackageReference Include="Google.Cloud.AIPlatform.V1" Version="3.24.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.7.0" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.7.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.60.0" />
<PackageReference Include="Microsoft.SemanticKernel.Abstractions" Version="1.60.0" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.61.0" />
<PackageReference Include="Microsoft.SemanticKernel.Abstractions" Version="1.61.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.8.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.8.2" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
Expand Down
8 changes: 4 additions & 4 deletions Anthropic.SDK.Tests/Messages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Anthropic.SDK.Tests
public class Messages
{
[TestMethod]
public async Task TestBasicClaude21Message()
public async Task TestBasicClaude4SonnetMessage()
{
var client = new AnthropicClient();
var messages = new List<Message>();
Expand All @@ -18,7 +18,7 @@ public async Task TestBasicClaude21Message()
{
Messages = messages,
MaxTokens = 512,
Model = AnthropicModels.Claude_v2_1,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
};
Expand Down Expand Up @@ -126,7 +126,7 @@ public async Task TestStreamingClaude3HaikuMessage()
}

[TestMethod]
public async Task TestStreamingClaude21Message()
public async Task TestStreamingClaude4SonnetMessage()
{
var client = new AnthropicClient();
var messages = new List<Message>();
Expand All @@ -135,7 +135,7 @@ public async Task TestStreamingClaude21Message()
{
Messages = messages,
MaxTokens = 512,
Model = AnthropicModels.Claude_v2_1,
Model = AnthropicModels.Claude4Sonnet,
Stream = true,
Temperature = 1.0m,
};
Expand Down
30 changes: 15 additions & 15 deletions Anthropic.SDK.Tests/Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public async Task TestBasicTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools.ToList()
Expand Down Expand Up @@ -127,7 +127,7 @@ public async Task TestEmptyArgsTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools.ToList()
Expand Down Expand Up @@ -166,7 +166,7 @@ public async Task TestFuncTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down Expand Up @@ -205,7 +205,7 @@ public async Task TestFuncErrorTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down Expand Up @@ -253,7 +253,7 @@ public async Task TestStaticObjectTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down Expand Up @@ -302,7 +302,7 @@ public async Task TestInstanceObjectTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down Expand Up @@ -350,7 +350,7 @@ public async Task TestMathFuncTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down Expand Up @@ -411,7 +411,7 @@ public async Task TestBasicToolManual()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down Expand Up @@ -464,7 +464,7 @@ public async Task TestFuncBoolTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down Expand Up @@ -506,7 +506,7 @@ public async Task TestFuncListTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down Expand Up @@ -553,7 +553,7 @@ public async Task TestFuncArrayTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools,
Expand Down Expand Up @@ -604,7 +604,7 @@ public async Task TestFuncMultiTool()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down Expand Up @@ -741,7 +741,7 @@ public class ColorProperty


[TestMethod]
public async Task TestClaude3ImageJsonModeMessage()
public async Task TestClaude4ImageJsonModeMessage()
{
string resourceName = "Anthropic.SDK.Tests.Red_Apple.jpg";

Expand Down Expand Up @@ -826,7 +826,7 @@ public async Task TestClaude3ImageJsonModeMessage()
{
Messages = messages,
MaxTokens = 1024,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down Expand Up @@ -858,7 +858,7 @@ public async Task TestMultipleCallsSameFunction()
{
Messages = messages,
MaxTokens = 2048,
Model = AnthropicModels.Claude3Sonnet,
Model = AnthropicModels.Claude4Sonnet,
Stream = false,
Temperature = 1.0m,
Tools = tools
Expand Down
12 changes: 7 additions & 5 deletions Anthropic.SDK/Anthropic.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<PackageTags>Claude, AI, ML, API, Anthropic</PackageTags>
<Title>Claude API</Title>
<PackageReleaseNotes>
Updates Microsoft.Extensions.AI.Abstractions, Tool Call Bug Fix
Updates Microsoft.Extensions.AI.Abstractions, Strong Name Assembly, Model Constant Deprecations
</PackageReleaseNotes>
<PackageId>Anthropic.SDK</PackageId>
<Version>5.4.3</Version>
<AssemblyVersion>5.4.3.0</AssemblyVersion>
<FileVersion>5.4.3.0</FileVersion>
<Version>5.5.0</Version>
<AssemblyVersion>5.5.0.0</AssemblyVersion>
<FileVersion>5.5.0.0</FileVersion>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
Expand All @@ -31,10 +31,12 @@
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>Anthropic.SDK.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.7.0" />
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.7.1" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
</ItemGroup>

Expand Down
Binary file added Anthropic.SDK/Anthropic.SDK.snk
Binary file not shown.
20 changes: 0 additions & 20 deletions Anthropic.SDK/Constants/AnthropicModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,11 @@
/// </summary>
public static class AnthropicModels
{
/// <summary>
/// Claude V2.1 latest full version.
/// </summary>
public const string Claude_v2_1 = "claude-2.1";

/// <summary>
/// Claude V2.0 latest full version.
/// </summary>
public const string Claude_v2_0 = "claude-2.0";

/// <summary>
/// Claude Instant V1.2 latest full version.
/// </summary>
public const string ClaudeInstant_v1_2 = "claude-instant-1.2";

/// <summary>
/// Claude 3 Opus
/// </summary>
public const string Claude3Opus = "claude-3-opus-20240229";

/// <summary>
/// Claude 3 Sonnet
/// </summary>
public const string Claude3Sonnet = "claude-3-sonnet-20240229";

/// <summary>
/// Claude 3.5 Sonnet
/// </summary>
Expand Down
5 changes: 0 additions & 5 deletions Anthropic.SDK/Constants/VertexAIModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ public static class VertexAIModels
/// </summary>
public const string Claude3Opus = "claude-3-opus@20240229";

/// <summary>
/// Claude 3 Sonnet on Vertex AI - Balanced Claude model for a wide range of tasks
/// </summary>
public const string Claude3Sonnet = "claude-3-sonnet@20240229";

/// <summary>
/// Claude 3 Haiku on Vertex AI - Fastest and most compact model for near-instant responsiveness
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Anthropic.SDK/Messaging/VertexAIMessagesEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal VertexAIMessagesEndpoint(VertexAIClient client) : base(client) { }
/// <summary>
/// The default model to use when no model is specified in the request parameters
/// </summary>
protected override string Model => Constants.VertexAIModels.Claude3Sonnet;
protected override string Model => Constants.VertexAIModels.Claude4Sonnet;

/// <summary>
/// Makes a non-streaming call to the Claude messages API via Vertex AI. Be sure to set stream to false in <param name="parameters"></param>.
Expand Down
Loading