Skip to content
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: Postgres pgvector backed index #315

Conversation

itsfrankjames
Copy link
Contributor

Description

Implementation of #314 - Postgres pgvector Index.

This implementation reflects the capabilities in the BaseIndex.

I've added a single optional dependency: psycopg3

A judicious review would be appreciated as I haven't written any production Python in a long time.

Random thoughts

I don't love that the Indexes other than Local require 'dimensions' to be set when instantiated, but the object is passed to RouteLayer as a sibling of the Encoder class.
This requires that the user know the dimensions of their embeddings despite that being an implementation detail of the encoder. Might open a seperate issue.

@jamescalam jamescalam changed the title [FEAT] Postgres pgvector backed index feat: Postgres pgvector backed index Jun 12, 2024
@jamescalam
Copy link
Member

@itsfrankjames thanks for the PR, we'll review — I also agree with you on the dimensions point, if you want to work on a PR feel free to, I can also add it to our backlog otherwise

@jamescalam jamescalam changed the base branch from main to pr/postgres-db June 28, 2024 08:06
@jamescalam
Copy link
Member

@itsfrankjames sorry for the delay, I'm merging into a local PR for testing, will update you again soon

@jamescalam jamescalam merged commit 01bd5f6 into aurelio-labs:pr/postgres-db Jun 28, 2024
3 of 6 checks passed
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.

2 participants