Fix: Move Pinecone index and namespace to environment variables#163
Open
Rinta13795 wants to merge 1 commit into
Open
Fix: Move Pinecone index and namespace to environment variables#163Rinta13795 wants to merge 1 commit into
Rinta13795 wants to merge 1 commit into
Conversation
Problem: - models/NewsModel.py hardcoded index_name as 'cybernews-hybrid-test-2' - models/NewsModel.py hardcoded namespace as 'c2si' - db_update/Update.py hardcoded namespace as 'c2si' - Prevented multi-environment deployment Solution: - Read PINECONE_INDEX_NAME from env (default: 'cybernews-index') - Read PINECONE_NAMESPACE from env (default: 'c2si') - Added both variables to .env.example - Maintains backward compatibility Testing: - Verified environment variable loading - Both online queries and offline updates now configurable Fixes c2siorg#111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Move Pinecone index and namespace to environment variables
Description
Problem:
Solution:
Related Issue
Fixes #111
Motivation and Context
This change allows the project to be deployed in multiple environments (dev/staging/prod) without code modifications. Users can now configure different Pinecone indexes and namespaces via environment variables.
How Has This Been Tested?
Types of changes
Checklist: