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(db-postgres): add vector raw column type #10422

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Jan 7, 2025

Example how you can add a vector column, enable the vector extension and query your embeddings in the included test -
https://github.com/payloadcms/payload/compare/feat/more-types?expand=1#diff-7d876370487cb625eb42ff1ad7cffa78e8327367af3de2930837ed123f5e3ae6R1-R117

@r1tsuu r1tsuu marked this pull request as ready for review January 7, 2025 16:20
@thekiwi
Copy link

thekiwi commented Jan 14, 2025

@r1tsuu This is awesome! I've been going in circles over the past two weeks trying to add an embeddings field with vector type on a collection. Will it get merged & rolled out any time soon?

@r1tsuu r1tsuu requested a review from DanRibbens January 14, 2025 15:53
Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing docs

@@ -81,6 +82,13 @@ export const buildDrizzleTable = ({
break
}

case 'vector': {
const builder = vector(column.name, { dimensions: column.dimensions })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing on mobile, are there any other properties for the options arg besides dimensions that we should pass through?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants