Skip to content

Conversation

@praveshkumar1988
Copy link
Collaborator

No description provided.

This comment was marked as outdated.

This comment was marked as outdated.

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 PR implements local downloading and usage of the sentence-transformers embedding model to avoid repeated downloads and improve performance. The changes move from environment-based configuration to .env file loading and add robust local model initialization with thread-safe singleton pattern.

  • Add local sentence transformer model download and caching functionality
  • Update Docker configuration to pre-download models and NLTK resources during build
  • Refactor embedding model loading to use lazy initialization and remove global variables

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docker-compose.yml Switch from environment variables to .env file configuration
backend/src/shared/common_fn.py Add singleton pattern for local embedding model with download functionality
backend/src/ragas_eval.py Improve NLTK resource downloading with better error handling
backend/src/make_relationships.py Remove global embedding variables and use lazy loading
backend/src/document_sources/gcs_bucket.py Add robust NLTK resource downloading with path configuration
backend/src/QA_integration.py Move embedding initialization to point of use instead of global
backend/requirements.txt Update sentence-transformers and ragas versions
backend/Dockerfile Pre-download embedding model and NLTK resources during build

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@praveshkumar1988 praveshkumar1988 merged commit 17e3b52 into dev Aug 19, 2025
3 checks passed
@praveshkumar1988 praveshkumar1988 deleted the st_model_download_locally branch August 19, 2025 11:55
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.

4 participants