Skip to content

Conversation

@praveshkumar1988
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a 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.document to langchain_core.documents and from langchain.prompts to langchain_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.

Comment on lines 44 to 45
unstructured==0.18.14
unstructured[all-docs]
Copy link

Copilot AI Dec 5, 2025

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.

Suggested change
unstructured==0.18.14
unstructured[all-docs]
unstructured[all-docs]==0.18.14

Copilot uses AI. Check for mistakes.
cd backend
python3.12 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt -c constraints.txt
Copy link

Copilot AI Dec 5, 2025

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.

Suggested change
pip install -r requirements.txt -c constraints.txt
pip install -r requirements.txt

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Dec 5, 2025

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.

Suggested change
from src.shared.common_fn import load_embedding_model,execute_graph_query

Copilot uses AI. Check for mistakes.
graphdatascience==1.15.1
Secweb==1.18.1
ragas==0.3.1
graphdatascience==1.18a1
Copy link

Copilot AI Dec 5, 2025

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.

Suggested change
graphdatascience==1.18a1
graphdatascience==1.18.0

Copilot uses AI. Check for mistakes.
3. Install Dependency :

> pip install -t requirements.txt
> pip install -r requirements.txt -c constraints.txt
Copy link

Copilot AI Dec 5, 2025

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.

Suggested change
> pip install -r requirements.txt -c constraints.txt
> pip install -r requirements.txt

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Dec 5, 2025

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.

Suggested change
from langchain_classic.document_transformers import EmbeddingsRedundantFilter

Copilot uses AI. Check for mistakes.
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