-
Notifications
You must be signed in to change notification settings - Fork 237
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
feat: Add Pinecone Local Index support and update dependencies #522
base: main
Are you sure you want to change the base?
Conversation
- Added PineconeLocalIndex to support local Pinecone testing - Updated GitHub Actions workflow to use Pinecone local service - Updated dependencies in pyproject.toml and poetry.lock - Modified schema and router to support PineconeLocalIndex - Updated test configurations to use PineconeLocalIndex
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
- Corrected string stripping and URL construction for localhost and base URL scenarios - Ensured consistent URL formatting across multiple methods - Minor code cleanup for host URL generation
- Replaced all references to PineconeIndex with PineconeLocalIndex in test files - Added dimension handling for OpenAI and Cohere encoders in index initialization - Updated GitHub Actions workflow to cache Poetry dependencies - Maintained existing test logic and retry mechanisms
- Updated default dimensions to 1536 in test_sync.py - Aligns with typical embedding model dimension requirements
- Changed default dimensions from 1536 to 3 in test_sync.py - Simplified index initialization parameter for testing purposes
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #522 +/- ##
==========================================
- Coverage 75.74% 74.88% -0.87%
==========================================
Files 43 43
Lines 3855 3930 +75
==========================================
+ Hits 2920 2943 +23
- Misses 935 987 +52 ☔ View full report in Codecov by Sentry. |
…implementation - Deleted `pinecone_local.py` and `10-pinecone-local.ipynb` - Updated `pinecone.py` to handle both cloud and local Pinecone index scenarios - Modified test files to use `PineconeIndex` instead of `PineconeLocalIndex` - Updated GitHub Actions workflow to simplify Python version testing - Improved error handling and host URL management in Pinecone index methods
- Uncomment and enable multiple Python versions (3.10, 3.11, 3.12, 3.13) - Enable Poetry caching in GitHub Actions - Remove local path addition comment - Simplify workflow configuration
semantic_router/index/pinecone.py
Outdated
@@ -127,19 +137,25 @@ def __init__( | |||
region: str = "us-east-1", | |||
host: str = "", | |||
namespace: Optional[str] = "", | |||
base_url: Optional[str] = "https://api.pinecone.io", | |||
base_url: Optional[str] = "", |
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.
@theanupllm wouldn't this break PineconeIndex
if used normally (ie not using pinecone local)?
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.
one q above
…nments - Update PineconeIndex to handle both local and cloud Pinecone index configurations - Add base_url default to Pinecone cloud API - Improve logging for base URL selection - Update documentation notebook to reflect new configuration approach
…/semantic-router into anup/pinecone-local
- Refactor base URL assignment to prioritize environment variable - Ensure consistent base URL configuration for Pinecone index - Maintain existing logging behavior for remote API usage
- Set X-Pinecone-API-Version header for cloud API endpoints - Ensure compatibility with Pinecone's latest API versioning
User description
PR Type
Enhancement, Tests, Documentation
Description
Introduced
PineconeLocalIndex
for local Pinecone testing.Updated test configurations and workflows to support
PineconeLocalIndex
.Added comprehensive documentation and examples for
PineconeLocalIndex
.Updated dependencies, including
aurelio-sdk
to version^0.0.18
.Changes walkthrough 📝
4 files
Added `PineconeLocalIndex` to index imports.
Implemented `PineconeLocalIndex` for local Pinecone testing.
Integrated `PineconeLocalIndex` into router initialization.
Updated schema to use `BM25SparseEmbedding` for compatibility.
1 files
Added unit tests for `PineconeLocalIndex` integration.
2 files
Updated GitHub Actions to include Pinecone Local service.
Adjusted test commands for functional testing.
2 files
Added tutorial for `PineconeLocalIndex` usage.
Added detailed example for `PineconeLocalIndex`.
1 files
Updated dependencies, including `aurelio-sdk` to `^0.0.18`.