-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net Anthropic connector progress (Claude 3) #5690
Comments
This issue is stale because it has been open for 90 days with no activity. |
Bump |
Any update on this? @RogerBarreto |
@Pekket I held with developing connector until function calling abstraction will be ready. But probably fca won't be ready fast, so yesterday we decided with @RogerBarreto to deploy connector now without fc functionality. I am working currently on connector code. |
@Krzysztof318 Thanks for the work, looks good 🦸 |
@Pekket soon but before we merge claude to main brach I think it will take couple of weeks. |
@Krzysztof318 We’re so excited for it. |
Hear hear! Claude support please! |
Part of: #5690 Anthropic chat generation (non-streaming) @RogerBarreto ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 --------- Co-authored-by: Roger Barreto <[email protected]>
There is any update? |
Sorry, I have much work last time, but I started working on streaming. I hope I will publish PR this week. |
#5690 Added samples @RogerBarreto --------- Co-authored-by: Roger Barreto <[email protected]>
I wanted to check in and see if there are any updates on the current development status. Specifically, I would like to know if there is an estimated date when the ongoing work will be merged into the master branch. Thank you for your time and support. |
@payoff I hope soon, currently I am waiting for review latest PR. |
Looks like 2 unit tests are failing? |
Any plans to support prompt caching at some point? https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching Might want to just want to have users add a flag to the ChatMessageContent metadata object and then add it to the payload when you serialize before sending. |
Is this up to date? Does the lack of function calling mean we can't use the new computer tool? |
Hi guys, I'm having a hard time finding a way to connect to Anthropic. It's something that's actually implemented in the latest versions of SemanticKernel. I'm currently working with version 1.72, which is the most stable, using KernelFactory. I don't really know why higher versions don't work with KernelFactory, and with Anthropic I have a connection error. It's something that's being tested. |
@nonoc Funny you ask, I started implementing computer use tool off where this work was stopped, have prototype here: https://github.com/BorgGames/semantic-kernel/tree/AnthropicTools (fork of this repo) Beta package is here: https://www.nuget.org/packages/Lost.SemanticKernel.Connectors.Anthropic/1.22.0-alpha0 Usagevar chatHistory = new ChatHistory();
chatHistory.AddUserMessage("Open Notepad and type Hi!");
var sut = new AnthropicChatCompletionService(this.AnthropicGetModel(), this.AnthropicGetApiKey(), new(beta: ComputerUse_2024_10_22.Beta));
var kernel = new Kernel();
kernel.Plugins.Add(ComputerUse_2024_10_22.ComputerPlugin(NoOpComputer.Instance));
// Act
var response = await sut.GetChatMessageContentsAsync(chatHistory, kernel: kernel);
// Assert
var lastMessage = response[^1];
var metadata = lastMessage.Metadata as AnthropicMetadata;
Assert.NotNull(metadata);
this.Output.WriteLine($"FinishReason: {metadata.FinishReason}");
Assert.Equal(AnthropicFinishReason.ToolUse, metadata.FinishReason);
var supposedlyScreenshotCall = lastMessage.Items
.OfType<FunctionCallContent>()
.FirstOrDefault();
Assert.NotNull(supposedlyScreenshotCall);
Assert.Equal("computer", supposedlyScreenshotCall.FunctionName);
if (supposedlyScreenshotCall.Arguments?["action"] is not JsonElement action)
{
Assert.Fail("action is not supplied or wrong type");
return;
}
Assert.Equal("screenshot", action.Deserialize<string>()); |
Any updates? really looking formward to use anthropic in my projects.. |
Just updated the alpha to the latest official release 1.25.0, and enabled an option to auto execute Computer Use tool. |
@lostmsu hi, nice to see you are working also on this connector. But instead of creating own repo could you contribute to anthropic branch and create PR in SK? |
@Krzysztof318 sure, I didn't notice the branch until recently. |
@Krzysztof318 have you tested on Google vertex? For me earlier I was having issues unless I made changes, which I commented on your PR. |
@therealpaulgg I haven't tested but I applied your suggestions. |
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> #5690 ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Added streaming functionality and related tests. @RogerBarreto @RogerBarret0 ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
Why we need to use .NET Standard 2.0 to use it? |
Will the Anthropic connector eventually get into semantic kernel repository? I'm asking because I saw the Ai.extensions released and got me thinking if this pr will be postponed. I hope not. |
@GLaNIK it will, PR is waiting for final review. AI.extensions is designed to integration with existing .net sdk of model providers. But anthropic doesn't have .net sdk. |
Progress of implementation of Anthropic Claude 3 family connector.
Current implementation BRANCH
TODO
The text was updated successfully, but these errors were encountered: