Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
This package contains the LangChain integrations with AWS.
pip install -U langchain-aws
All integrations in this package assume that you have the credentials setup to connect with AWS services.
ChatBedrock
class exposes chat models from Bedrock.
from langchain_aws import ChatBedrock
llm = ChatBedrock()
llm.invoke("Sing a ballad of LangChain.")
BedrockEmbeddings
class exposes embeddings from Bedrock.
from langchain_aws import BedrockEmbeddings
embeddings = BedrockEmbeddings()
embeddings.embed_query("What is the meaning of life?")
BedrockLLM
class exposes LLMs from Bedrock.
from langchain_aws import BedrockLLM
llm = BedrockLLM()
llm.invoke("The meaning of life is")
AmazonKendraRetriever
class provides a retriever to connect with Amazon Kendra.
from langchain_aws import AmazonKendraRetriever
retriever = AmazonKendraRetriever(
index_id="561be2b6d-9804c7e7-f6a0fbb8-5ccd350"
)
retriever.get_relevant_documents(query="What is the meaning of life?")
AmazonKnowledgeBasesRetriever
class provides a retriever to connect with Amazon Knowledge Bases.
from langchain_aws import AmazonKnowledgeBasesRetriever
retriever = AmazonKnowledgeBasesRetriever(
knowledge_base_id="IAPJ4QPUEU",
retrieval_config={"vectorSearchConfiguration": {"numberOfResults": 4}},
)
retriever.get_relevant_documents(query="What is the meaning of life?")
InMemoryVectorStore
class provides a vectorstore to connect with Amazon MemoryDB.
from langchain_aws.vectorstores.inmemorydb import InMemoryVectorStore
vds = InMemoryVectorStore.from_documents(
chunks,
embeddings,
redis_url="rediss://cluster_endpoint:6379/ssl=True ssl_cert_reqs=none",
vector_schema=vector_schema,
index_name=INDEX_NAME,
)
Here we go over different options for using the vector store as a retriever.
There are three different search methods we can use to do retrieval. By default, it will use semantic similarity.
retriever=vds.as_retriever()
FAQs
An integration package connecting AWS and LangChain
We found that langchain-aws demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.