Skip to content
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

feat: AnthropicBedrock support ⛰️ #7

Merged
merged 5 commits into from
Aug 16, 2024

Conversation

JGalego
Copy link
Contributor

@JGalego JGalego commented Aug 13, 2024

This PR adds support for Anthropic Claude models via Amazon Bedrock.

Since the focus is on consistency, this implementation uses the AnthropicBedrock class (via Anthropic Python SDK) instead of a pure boto3 implementation and introduces minimal code changes.

Example:

python launch_scientist.py --model "bedrock/anthropic.claude-3-sonnet-20240229-v1:0" \
                           --experiment nanoGPT_lite \
                           --num-ideas 2

@JGalego JGalego changed the title feat: AnthropicBedrock support feat: AnthropicBedrock support ⛰️ Aug 13, 2024
@conglu1997 conglu1997 added the enhancement New feature or request label Aug 13, 2024
@JGalego JGalego marked this pull request as ready for review August 13, 2024 23:21
@conglu1997
Copy link
Collaborator

Thank you so much for this, does this already direct Aider queries to Bedrock as well?

@JGalego
Copy link
Contributor Author

JGalego commented Aug 14, 2024

Thank you so much for this, does this already direct Aider queries to Bedrock as well?

Aider uses LiteLLM behind the scenes (paul-gauthier/aider#713), so it should work as long as we use the --model "bedrock/<MODEL_ID>" format (check the full list of supported Amazon Bedrock models). I forgot to add the new model choices to launch_oe_scientist.py and perform_writeup.py, but that's all fixed now. One thing to keep in mind though is that AnthropicBedrock expects only the model ID, no prefix (hence all the split's).

@conglu1997 conglu1997 merged commit 42be334 into SakanaAI:main Aug 16, 2024
@conglu1997
Copy link
Collaborator

Thank you! We are grateful for this implementation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants