-
Couldn't load subscription status.
- Fork 722
sentenceTransformar embedding model download locally to use #1361
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
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 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.
No description provided.