-
Notifications
You must be signed in to change notification settings - Fork 4k
Python: Add vector search to Postgres connector #10213
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
Merged
eavanvalkenburg
merged 23 commits into
microsoft:main
from
lossyrob:feature/python-postgres-search
Jan 30, 2025
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8fdb654
Add vectorized search to postgres connector
lossyrob db0e305
Allow kwargs and connection class in settings
lossyrob 7762f28
Don't validate connstr in case custom connector
lossyrob 95ea77e
Fix issue with closing connection pools
lossyrob 54ecdf5
Allow conversion of additional selected columns
lossyrob 0f3cb9a
Return total search count if requested
lossyrob be47d6f
Add integration test for postgres vector search
lossyrob 96b14e5
Add vector search to postgres example notebook
lossyrob 4a65db5
Rerun notebook to remove typo in gpt-4o response
lossyrob 94a0800
Use shortcut import paths in sample
lossyrob 4d5f4b9
Lint: Fix imports
lossyrob e2ac0a5
Ensure distance column name does not conflict with model field
lossyrob 8884395
Use named placeholders in sql.SQL.format
lossyrob 5391b8c
Remove unused fields copy; avoid including any vectors on option
lossyrob dd74c4f
Add comment on cosine similarity and dot prod calculation
lossyrob 89b2a9f
Fix model_post_init
lossyrob 79c0e32
Test include_vectors and include_total_count
lossyrob 2b58e0c
async pull rows in search if total count not needed
lossyrob 460839a
Fix unit test for async result fetching
lossyrob 39a855f
Shorten import package paths
lossyrob 24d6346
Modify distance column name conflict resolve logic
lossyrob 3eca521
Use data_model_definition.get_field_names
lossyrob 178588d
Inline select_fields
lossyrob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
427 changes: 400 additions & 27 deletions
427
python/samples/getting_started/third_party/postgres-memory.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
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
382 changes: 311 additions & 71 deletions
382
python/semantic_kernel/connectors/memory/postgres/postgres_collection.py
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.