Skip to main content

An integration package connecting AWS and LangChain

Project description

langchain-aws

This package contains the LangChain integration with Bedrock

Installation

pip install -U langchain-aws

And you should configure credentials by setting the following environment variables:

  • TODO: fill this out

Chat Models

ChatBedrock class exposes chat models from Bedrock.

from langchain_aws import ChatBedrock

llm = ChatBedrock()
llm.invoke("Sing a ballad of LangChain.")

Embeddings

BedrockEmbeddings class exposes embeddings from Bedrock.

from langchain_aws import BedrockEmbeddings

embeddings = BedrockEmbeddings()
embeddings.embed_query("What is the meaning of life?")

LLMs

BedrockLLM class exposes LLMs from Bedrock.

from langchain_aws import BedrockLLM

llm = BedrockLLM()
llm.invoke("The meaning of life is")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_aws-0.1.0rc0.tar.gz (20.2 kB view hashes)

Uploaded Source

Built Distribution

langchain_aws-0.1.0rc0-py3-none-any.whl (25.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page