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 reworked Neptune chains #322

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

michaelnchin
Copy link
Collaborator

Replaces #306.

Adding new LCEL format chains create_neptune_opencypher_qa_chain and create_neptune_sparql_qa_chain for Amazon Neptune.

These will replace the legacy NeptuneOpenCypherQAChain and NeptuneSparqlQAChain chains in langchain-community.

To import, run:

from langchain_aws.chains import (
    create_neptune_opencypher_qa_chain,
    create_neptune_sparql_qa_chain,
)

@michaelnchin michaelnchin mentioned this pull request Jan 11, 2025
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
This looks great! One minor comment, looks good otherwise.

Another thing to note is that users will benefit from a sample notebook with examples for using message history with these new LCEL chains, as the implementation is very different from the legacy memory classes. These notebooks also need an update, once we add deprecation messages to the LangChain repo.
https://github.com/langchain-ai/langchain/blob/c55af44711ba9180ce8a51a55a385f31023341b5/docs/docs/integrations/graphs/amazon_neptune_open_cypher.ipynb

libs/aws/langchain_aws/chains/__init__.py Outdated Show resolved Hide resolved
ccurme added a commit to langchain-ai/langchain that referenced this pull request Jan 14, 2025
…29191)

Related: langchain-ai/langchain-aws#322

The legacy `NeptuneOpenCypherQAChain` and `NeptuneSparqlQAChain` classes
are being replaced by the new LCEL format chains
`create_neptune_opencypher_qa_chain` and
`create_neptune_sparql_qa_chain`, respectively, in the `langchain_aws`
package.

This PR adds deprecation warnings to all Neptune classes and functions
that have been migrated to `langchain_aws`. All relevant documentation
has also been updated to replace `langchain_community` usage with the
new `langchain_aws` implementations.

---------

Co-authored-by: Chester Curme <[email protected]>
@3coins 3coins merged commit 38c28fa into langchain-ai:main Jan 15, 2025
12 checks passed
@michaelnchin michaelnchin deleted the neptune-chains-rework branch January 15, 2025 19:05
@michaelnchin
Copy link
Collaborator Author

Another thing to note is that users will benefit from a sample notebook with examples for using message history with these new LCEL chains, as the implementation is very different from the legacy memory classes.

Added in langchain-ai/langchain#29260.

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