Skip to content

PR Summary: Refactor Embedding Handling and Environment Configuration#7

Merged
HillviewCap merged 5 commits intoDEV/LLMS-TXT-INTEGRATIONfrom
BUG/EMBEDDING-ENV-ISSUE
Apr 1, 2025
Merged

PR Summary: Refactor Embedding Handling and Environment Configuration#7
HillviewCap merged 5 commits intoDEV/LLMS-TXT-INTEGRATIONfrom
BUG/EMBEDDING-ENV-ISSUE

Conversation

@HillviewCap
Copy link
Copy Markdown
Owner

Purpose
This PR introduces a more flexible embedding generation system, improves environment variable handling for background processing, and updates configurations to support different embedding models (specifically nomic-embed-text via Ollama).

Key Changes
Embedding Abstraction (EmbeddingManager)

Introduced EmbeddingManager to handle embedding generation logic, allowing for different providers and models
Removed the previous direct OpenAI embedding function (get_embedding) from agent_tools.py
Refactored relevant components to utilize the new EmbeddingManager
Environment Variable Propagation

Modified documentation.py to explicitly pass environment variables to subprocess calls
Ensures processing scripts use the correct settings configured in the Streamlit UI
Configuration Updates

Updated SQL schema for vector dimensions (768 for nomic-embed-text)
Added VECTOR_DIMENSION input field to the environment configuration page
Added langchain-community to requirements.txt
Debugging

Added debug logging statements for better insight into embedding generation and database queries

- Install langchain-ollama package
- Update embedding_manager.py to use langchain_ollama.embeddings
- Correct EMBEDDING_BASE_URL in env_vars.json (remove /v1)
- Add detailed error logging in embedding_manager.py
- Comment out verbose node insertion failure message in run_processing.py
@HillviewCap HillviewCap merged commit 954723a into DEV/LLMS-TXT-INTEGRATION Apr 1, 2025
@HillviewCap HillviewCap deleted the BUG/EMBEDDING-ENV-ISSUE branch April 1, 2025 23:52
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.

1 participant