-
Notifications
You must be signed in to change notification settings - Fork 32
Add LangChain v1 support #91
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
Conversation
- Update langchain-core from ^0.3 to ^1.0 in main dependencies - Replace git-based dependencies with PyPI releases for all groups - Update langchain-openai to ^1.0 across all dependency groups - Maintain compatibility with existing Redis and other dependencies This addresses issue #86 by enabling compatibility with LangChain v1.0+
- Update version in pyproject.toml from 0.2.4 to 1.0.0 - Update version in version.py from 0.2.0 to 1.0.0 - Major version bump indicates breaking change compatibility with LangChain v1
- Update cache.ipynb: langchain.globals -> langchain_core.globals, langchain.schema -> langchain_core.outputs - Update vectorstores.ipynb: langchain.docstore.document -> langchain_core.documents - Update kitchensink.ipynb: langchain.globals -> langchain_core.globals - Update langgraph_self_rag.ipynb: langchain.text_splitter -> langchain_text_splitters These changes ensure documentation examples work with LangChain v1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR successfully adds support for LangChain v1 by updating dependencies and fixing compatibility issues throughout the codebase.
Key Changes:
- Updated core dependencies from LangChain v0.3 to v1.0 (langchain-core and langchain-openai)
- Bumped package version to 1.0.0 to reflect the major update
- Updated minimum Python version requirement from 3.9 to 3.10
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
libs/redis/pyproject.toml |
Updated dependencies to use LangChain v1.0 and changed Python version requirement to >=3.10 |
libs/redis/poetry.lock |
Regenerated lock file with LangChain v1.0 dependencies and updated package versions |
libs/redis/langchain_redis/version.py |
Updated version string from 0.2.0 to 1.0.0 |
libs/redis/docs/vectorstores.ipynb |
Updated import from langchain.docstore.document to langchain_core.documents |
libs/redis/docs/langgraph_self_rag.ipynb |
Updated import from langchain.text_splitter to langchain_text_splitters |
libs/redis/docs/kitchensink.ipynb |
Updated import from langchain.globals to langchain_core.globals |
libs/redis/docs/chat_history.ipynb |
Reorganized imports to improve code style |
libs/redis/docs/cache.ipynb |
Updated imports from langchain.globals and langchain.schema to langchain_core equivalents |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Ready for review 🫡 |
tylerhutcherson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, left a few comments on the markdowns and the package versioning
- Update Python requirement from >=3.9 to >=3.10 to match LangChain v1 requirements - Regenerate poetry.lock with new dependency constraints - This ensures compatibility with LangChain v1 which requires Python 3.10+
- Remove Python 3.9 support (EOL October 2025) - Add Python 3.13 support - Update test, lint, and compile integration test workflows - Aligns with LangChain v1 Python 3.10+ requirement
- Create detailed migration documentation for v0.3.0 upgrade (LangChain v1) - Include step-by-step migration instructions - Add troubleshooting section and FAQ - Include before/after code examples
53b8312 to
f2e73b2
Compare
This PR adds support for LangChain v1. Standing on the shoulders of #89 and #92.