mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-29 19:18:53 +00:00
- **Description:** Adds an additional class variable to `BedrockBase` called `provider` that allows sending a model provider such as amazon, cohere, ai21, etc. Up until now, the model provider is extracted from the `model_id` using the first part before the `.`, such as `amazon` for `amazon.titan-text-express-v1` (see [supported list of Bedrock model IDs here](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids-arns.html)). But for custom Bedrock models where the ARN of the provisioned throughput must be supplied, the `model_id` is like `arn:aws:bedrock:...` so the `model_id` cannot be extracted from this. A model `provider` is required by the LangChain Bedrock class to perform model-based processing. To allow the same processing to be performed for custom-models of a specific base model type, passing this `provider` argument can help solve the issues. The alternative considered here was the use of `provider.arn:aws:bedrock:...` which then requires ARN to be extracted and passed separately when invoking the model. The proposed solution here is simpler and also does not cause issues for current models already using the Bedrock class. - **Issue:** N/A - **Dependencies:** N/A --------- Co-authored-by: Piyush Jain <piyushjain@duck.com> |
||
---|---|---|
.. | ||
api_reference | ||
docs | ||
scripts | ||
src | ||
static | ||
.local_build.sh | ||
babel.config.js | ||
code-block-loader.js | ||
docusaurus.config.js | ||
package-lock.json | ||
package.json | ||
README.md | ||
settings.ini | ||
sidebars.js | ||
vercel_build.sh | ||
vercel_requirements.txt | ||
vercel.json |
LangChain Documentation
For more information on contributing to our documentation, see the Documentation Contributing Guide