langchain-ai / langchain-aws

Build LangChain Applications on AWS
MIT License
104 stars 82 forks source link
aws generative-ai langchain langchain-python

🦜️🔗 LangChain 🤝 Amazon Web Services (AWS)

This repository provides LangChain components for various AWS services. It aims to replace and expand upon the existing LangChain AWS components found in the langchain-community package in the LangChain repository.

Features

Note: This repository will replace all AWS integrations currently present in the langchain-community package. Users are encouraged to migrate to this repository as soon as possible.

Installation

You can install the langchain-aws package from PyPI.

pip install langchain-aws

Usage

Here's a simple example of how to use the langchain-aws package.

from langchain_aws import BedrockLLM

# Initialize the Bedrock LLM
llm = BedrockLLM(
    model_id="anthropic.claude-v2:1"
)

# Invoke the llm
response = llm.invoke("Hello! How are you today?")
print(response)

For more detailed usage examples and documentation, please refer to the LangChain docs.

Contributing

We welcome contributions to this project! Please follow the contribution guide for instructions to setup the project for development and guidance on how to contribute effectively.

License

This project is licensed under the MIT License.