Amazon Bedrock is a fully managed service that offers a choice of high-performing foundation models (FMs) from leading AI companies like AI21 Labs, Anthropic, Cohere, Meta, Stability AI, and Amazon via a single API, along with a broad set of capabilities you need to build generative AI applications with security, privacy, and responsible AI. This will help you getting started withDocumentation Index
Fetch the complete documentation index at: https://nvd-54.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
BedrockChat chat models. For detailed documentation of all BedrockChat features and configurations head to the API reference.
概述
集成详情
| Class | Package | Serializable | PY support | Downloads | Version |
|---|---|---|---|---|---|
BedrockChat | @langchain/community | ✅ | ✅ |
模型功能
请参阅下表标题中的链接,了解如何使用特定功能。| Tool calling | Structured output | Image input | Audio input | Video input | Token-level streaming | Token usage | Logprobs |
|---|---|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ |
设置
要访问 Bedrock models,你需要create an AWS account, set up the Bedrock API service, get an access key ID and secret key, and install the@langchain/community integration package.
凭证
Head to the AWS docs to sign up for AWS and setup your credentials. You’ll also need to turn on model access for your account, which you can do by following these instructions. 如果你想要自动追踪模型调用,还可以设置你的 LangSmith API 密钥,取消注释以下内容:安装
The LangChainBedrockChat integration lives in the @langchain/community package. You’ll also need to install several official AWS packages as peer dependencies:
实例化
Currently, only Anthropic, Cohere, and Mistral models are supported with the chat model integration. For foundation models from AI21 or Amazon, see the text generation Bedrock variant. There are a few different ways to authenticate with AWS - the below examples rely on an access key, secret access key and region set in your environment variables:调用
工具调用
Tool calling with Bedrock models works in a similar way to other models, but note that not all Bedrock models support tool calling. Please refer to the AWS model documentation for more information.API 参考
有关所有BedrockChat 功能和配置的详细文档,请前往 API 参考。
将这些文档连接到 Claude、VSCode 等工具,通过 MCP 获取实时答案。

