This PR adds support for Amazon Bedrock, allowing TextGrad users to leverage a variety of foundation models from AI21 Labs, Anthropic, Cohere, Meta, Mistral AI, Stability AI, and Amazon through a single API.
Key Changes
Implemented support for Amazon Bedrock in the get_engine function
Added compatibility for Meta, Anthropic, Cohere, Mistral, and Amazon models
Introduced a new naming convention for Bedrock models: bedrock-<model_name_id> (here the model id list)
Usage
To use a Bedrock model, call the get_engine function with the Bedrock model name ID prefixed by "bedrock-". For example:
Overview
This PR adds support for Amazon Bedrock, allowing TextGrad users to leverage a variety of foundation models from AI21 Labs, Anthropic, Cohere, Meta, Mistral AI, Stability AI, and Amazon through a single API.
Key Changes
get_engine
functionbedrock-<model_name_id>
(here the model id list)Usage
To use a Bedrock model, call the
get_engine
function with the Bedrock model name ID prefixed by "bedrock-". For example:Authentication
The PR supports two authentication methods:
Supported Models
This PR adds support for the following model families:
A complete list of supported model IDs will be added to the documentation.
Testing
Feedback
I welcome any feedback or suggestions for improvement. Please let me know if any additional changes or clarifications are needed.