-
Notifications
You must be signed in to change notification settings - Fork 750
Python version, langchain libraries and document upgrade #1410
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
base: dev
Are you sure you want to change the base?
Conversation
…ts for langchain modules
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 pull request upgrades the project's Python version from 3.10 to 3.12 and updates LangChain libraries to newer versions. The changes include updating import paths from deprecated LangChain modules to current ones, upgrading numerous package versions in requirements.txt, and updating documentation to reflect the new Python version requirement.
- Python version upgraded from 3.10 to 3.12 across Dockerfile and documentation
- LangChain imports migrated from deprecated
langchain.docstore.documenttolangchain_core.documentsand fromlangchain.promptstolangchain_core.prompts - Dependencies updated to newer versions, including major version bumps for langchain packages (0.3.x → 1.x)
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/project_docs.adoc | Added prerequisites section specifying Python 3.12+ and Node.js 20+, updated virtual environment setup command to use python3.12 |
| backend/src/make_relationships.py | Updated Document import from deprecated langchain.docstore to langchain_core.documents |
| backend/src/llm.py | Updated Document import from deprecated langchain.docstore to langchain_core.documents |
| backend/src/document_sources/youtube.py | Updated Document import from deprecated langchain.docstore to langchain_core.documents |
| backend/src/create_chunks.py | Updated Document import from deprecated langchain.docstore to langchain_core.documents |
| backend/src/QA_integration.py | Updated multiple LangChain imports to use langchain_core for prompts and langchain_classic for retrievers/compressors |
| backend/requirements.txt | Upgraded all LangChain packages to v1.x, updated numerous dependencies including asyncio, certifi, and added langchain-classic |
| backend/README.md | Added prerequisites section, updated setup instructions to use python3.12 and added constraints.txt flag to pip install |
| backend/Dockerfile | Updated base image from python:3.10-slim to python:3.12-slim |
| README.md | Added comprehensive prerequisites and backend setup section with Python 3.12 requirement and constraints.txt flag |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
backend/requirements.txt
Outdated
| unstructured==0.18.14 | ||
| unstructured[all-docs] |
Copilot
AI
Dec 5, 2025
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.
The unstructured package appears twice in the requirements (line 44 with version 0.18.14 and line 45 with [all-docs] extra). Consider consolidating these into a single line as unstructured[all-docs]==0.18.14 to avoid potential installation conflicts and improve clarity.
| unstructured==0.18.14 | |
| unstructured[all-docs] | |
| unstructured[all-docs]==0.18.14 |
| cd backend | ||
| python3.12 -m venv venv | ||
| source venv/bin/activate # On Windows: venv\Scripts\activate | ||
| pip install -r requirements.txt -c constraints.txt |
Copilot
AI
Dec 5, 2025
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.
The command includes -c constraints.txt but there's no mention of a constraints.txt file in the repository or documentation. If this file doesn't exist or isn't provided, users will encounter an error. Either ensure the constraints.txt file is included in the repository or remove this flag from the command.
| pip install -r requirements.txt -c constraints.txt | |
| pip install -r requirements.txt |
backend/src/make_relationships.py
Outdated
| from langchain.docstore.document import Document | ||
| from langchain_core.documents import Document | ||
| from src.shared.common_fn import load_embedding_model,execute_graph_query | ||
| from src.shared.common_fn import load_embedding_model,execute_graph_query |
Copilot
AI
Dec 5, 2025
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.
Duplicate import statement detected. This import appears twice on consecutive lines and should be removed.
| from src.shared.common_fn import load_embedding_model,execute_graph_query |
| graphdatascience==1.15.1 | ||
| Secweb==1.18.1 | ||
| ragas==0.3.1 | ||
| graphdatascience==1.18a1 |
Copilot
AI
Dec 5, 2025
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.
Using an alpha version (1.18a1) of graphdatascience in production is not recommended. Alpha versions are pre-release and may contain bugs or breaking changes. Consider using a stable release version instead.
| graphdatascience==1.18a1 | |
| graphdatascience==1.18.0 |
| 3. Install Dependency : | ||
|
|
||
| > pip install -t requirements.txt | ||
| > pip install -r requirements.txt -c constraints.txt |
Copilot
AI
Dec 5, 2025
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.
The command includes -c constraints.txt but there's no mention of a constraints.txt file in the repository or documentation. If this file doesn't exist or isn't provided, users will encounter an error. Either ensure the constraints.txt file is included in the repository or remove this flag from the command.
| > pip install -r requirements.txt -c constraints.txt | |
| > pip install -r requirements.txt |
backend/src/QA_integration.py
Outdated
| from langchain_community.document_transformers import EmbeddingsRedundantFilter | ||
| from langchain.retrievers.document_compressors import EmbeddingsFilter, DocumentCompressorPipeline | ||
| from langchain_classic.retrievers import ContextualCompressionRetriever | ||
| from langchain_classic.document_transformers import EmbeddingsRedundantFilter |
Copilot
AI
Dec 5, 2025
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.
Import of 'EmbeddingsRedundantFilter' is not used.
| from langchain_classic.document_transformers import EmbeddingsRedundantFilter |
No description provided.