Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme #13

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,3 @@ NOTE: This repository is a work-in-progress. Currently, the AWS integrations are
This repository contains 1 package with AWS integrations with LangChain:

- [langchain-aws](https://pypi.org/project/langchain-aws/) integrates [AWS](https://aws.amazon.com).

## Initial Repo Checklist (Remove this section after completing)

This setup assumes that the partner package is already split. For those instructions,
see [these docs](https://python.langchain.com/docs/contributing/integrations#partner-packages).

- [ ] Copy package into /libs folder
- [ ] Update these fields in /libs/*/pyproject.toml

- `tool.poetry.repository`
- `tool.poetry.urls["Source Code"]`

- [ ] Add integration testing secrets in Github (ask Erick for help)
- [ ] Add secrets as env vars in .github/workflows/_release.yml
- [ ] Configure `LIB_DIRS` in .github/scripts/check_diff.py
- [ ] Add partner collaborators in Github (ask Erick for help)
- [ ] Add new repo to test-pypi and pypi trusted publishing (ask Erick for help)
- [ ] Populate .github/workflows/_release.yml with `on.workflow_dispatch.inputs.working-directory.default`
33 changes: 28 additions & 5 deletions libs/aws/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# langchain-aws

This package contains the LangChain integration with Bedrock
This package contains the LangChain integrations with AWS.

## Installation

```bash
pip install -U langchain-aws
```

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

* TODO: fill this out
All integrations in this package assume that you have the credentials setup to connect with AWS services.

## Chat Models

Expand Down Expand Up @@ -43,3 +40,29 @@ from langchain_aws import BedrockLLM
llm = BedrockLLM()
llm.invoke("The meaning of life is")
```

## Retrievers
`AmazonKendraRetriever` class provides a retriever to connect with Amazon Kendra.

```python
from langchain_aws import AmazonKendraRetriever

retriever = AmazonKendraRetriever(
index_id="561be2b6d-9804c7e7-f6a0fbb8-5ccd350"
)

retriever.get_relevant_documents(query="What is the meaning of life?")
```

`AmazonKnowlegeBasesRetriever` class provides a retriever to connect with Amazon Knowlege Bases.

```python
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?")
```
Loading