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

Makes GraphStore a Protocol #35

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

alexthomas93
Copy link
Collaborator

@alexthomas93 alexthomas93 commented Jan 10, 2025

Description

Previously, the GraphStore abstract base class lived in the LangChain Community package, allowing other graph DB vendors to inherit from it and build integrations for LangChain. We have now moved this class to the LangChain Neo4j package. We also require the graph passed to the GraphCypherQAChain to be a GraphStore. This means that other graph DB vendors must now inherit from the GraphStore class in the LangChain Neo4j package in order to be compatible with the GraphCypherQAChain.

This PR changes the GraphStore class to a Protocol, which allows other graph integrations to work with the GraphCypherQAChain without the explicit need to inherit from the GraphStore class in the LangChain Neo4j package.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Project configuration change

Complexity

Low

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual tests

Checklist

  • Unit tests updated
  • Integration tests updated
  • CHANGELOG.md updated

@alexthomas93
Copy link
Collaborator Author

@CodiumAI-Agent /update_changelog

@CodiumAI-Agent
Copy link

Changelog updates: 🔄

2025-01-10

Changed

  • Updated GraphStore to be a Protocol, enabling compatibility with GraphCypherQAChain without requiring inheritance.

to commit the new content to the CHANGELOG.md file, please type:
'/update_changelog --pr_update_changelog.push_changelog_changes=true'

@alexthomas93 alexthomas93 linked an issue Jan 10, 2025 that may be closed by this pull request
Copy link
Collaborator

@stellasia stellasia left a comment

Choose a reason for hiding this comment

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

Nice one!

@alexthomas93 alexthomas93 merged commit 158699e into langchain-ai:main Jan 10, 2025
8 checks passed
@alexthomas93 alexthomas93 deleted the fix/graph-store-protocol branch January 10, 2025 14:20
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.

ValidationError: 1 validation error for GraphCypherQAChain
3 participants