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

Add Neptune chains #306

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

michaelnchin
Copy link
Contributor

Initial port of NeptuneOpenCypherQAChain and NeptuneSparqlQAChain out of the langchain-community package.

This also adds the base langchain package as a new dependency.

To import, run:

from langchain_aws.chains import (
    NeptuneOpenCypherQAChain
    NeptuneSparqlQAChain
)

@3coins
Copy link
Collaborator

3coins commented Dec 17, 2024

@efriis
Is there any concern on adding langchain as a direct dependency here?

Copy link
Collaborator

@3coins 3coins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelnchin
Thanks for submitting this change. Adding a direct dependency on langchain will not only increase the size of the package, but also increase the dependency footprint of langchain-aws. We should pivot to updating the code to start using LCEL chains, so there is no direct dependency on langchain. Here is an example where LangChain moved their StuffDocumentsChain to a factory method that returns an LCEL chain, we should follow the same strategy.
https://github.com/langchain-ai/langchain/blob/1378ddfa5fa901179a26e0e2a91cbea52de625cf/libs/langchain/langchain/chains/combine_documents/stuff.py#L24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants