-
Notifications
You must be signed in to change notification settings - Fork 559
feat(js/plugins): add anthropic plugin #3785
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Giorgio Garasto <[email protected]> Co-authored-by: EPMatt <[email protected]> Co-authored-by: Xavier Portilla Edo <[email protected]> Co-authored-by: David Alonso <[email protected]> Co-authored-by: Michael Doyle <[email protected]> Co-authored-by: Michał Tuszyński <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andres Säde <[email protected]> Co-authored-by: Corie Watson <[email protected]> Co-authored-by: Dan Nelson <[email protected]> Co-authored-by: David Oort Alonso <[email protected]> Co-authored-by: Matteo Agnoletto <[email protected]> Co-authored-by: Michael Doyle <[email protected]> Co-authored-by: Swen Mun <[email protected]> Co-authored-by: nalin <[email protected]>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
| @@ -0,0 +1,170 @@ | |||
| /** | |||
| * Original work Copyright 2024 Bloom Labs Inc | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update headers for dual ownership
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| export const anthropic = anthropicPlugin as AnthropicPlugin; | ||
| (anthropic as any).model = ( | ||
| name: string, | ||
| config?: any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: double check types here
|
|
||
| /** | ||
| * Anthropic AI plugin for Genkit. | ||
| * Includes Claude models (3, 3.5, 3.7, and 4 series). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: update comment? claude models etc
1P Anthropic Plugin
This PR introduces an official first-party Anthropic plugin for the Genkit framework.
It provides comprehensive support for Anthropic's Claude models with both stable and beta API endpoints.
Notes:
runner/base.tsandrunner/beta.ts,runner/stable.ts, using generics to reduce duplication of code where possible.Attribution
This plugin builds upon the excellent foundation provided by the community genkitx-anthropic package originally developed by Bloom Labs Inc. Their Apache 2.0 licensed implementation served as the starting point for this official plugin.
TODO: Review and ensure all necessary attribution requirements have been met. So far we have:
TODO: Clean up commit history, ensure conventional commit titles throughout.
TODO: Finish off manual testing of all features
TODO: Check that (private) injection of __testClient is OK
TODO: figure out CLA/attribution issues
##References:
v2 API migration guide doc:
https://docs.google.com/document/d/1s1YKwhqdrGN44IG7lSAwltxM3Bqh9p6jTcri8SNaBWk/edit?tab=t.0#heading=h.5nmgndd9f76y
Manual Testing