AWS
The LangChain
integrations related to Amazon AWS platform.
First-party AWS integrations are available in the langchain_aws
package.
pip install langchain-aws
And there are also some community integrations available in the langchain_community
package with the boto3
optional dependency.
pip install langchain-community boto3
Chat models
Bedrock Chat
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
, andAmazon
via a single API, along with a broad set of capabilities you need to build generative AI applications with security, privacy, and responsible AI. UsingAmazon Bedrock
, you can easily experiment with and evaluate top FMs for your use case, privately customize them with your data using techniques such as fine-tuning andRetrieval Augmented Generation
(RAG
), and build agents that execute tasks using your enterprise systems and data sources. SinceAmazon Bedrock
is serverless, you don't have to manage any infrastructure, and you can securely integrate and deploy generative AI capabilities into your applications using the AWS services you are already familiar with.
See a usage example.
from langchain_aws import ChatBedrock
Bedrock Converse
AWS Bedrock maintains a Converse API that provides a unified conversational interface for Bedrock models. This API does not yet support custom models. You can see a list of all models that are supported here.
We recommend the Converse API for users who do not need to use custom models. It can be accessed using ChatBedrockConverse.
See a usage example.
from langchain_aws import ChatBedrockConverse
LLMs
Bedrock
See a usage example.
from langchain_aws import BedrockLLM
Amazon API Gateway
Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. APIs act as the "front door" for applications to access data, business logic, or functionality from your backend services. Using
API Gateway
, you can create RESTful APIs and WebSocket APIs that enable real-time two-way communication applications.API Gateway
supports containerized and serverless workloads, as well as web applications.
API Gateway
handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, CORS support, authorization and access control, throttling, monitoring, and API version management.API Gateway
has no minimum fees or startup costs. You pay for the API calls you receive and the amount of data transferred out and, with theAPI Gateway
tiered pricing model, you can reduce your cost as your API usage scales.
See a usage example.
from langchain_community.llms import AmazonAPIGateway