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

community[minor]: add neon postgres as a vector store #5152

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

ananis25
Copy link
Contributor

This PR adds Neon Postgres (backed by the pgvector extension) as a vector store. The code mostly follows the vercel-postgres integration but uses the Neon database serverless driver (https://github.com/neondatabase/serverless), which is quicker for one-shot queries.

(I write technical content for Neon)

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Apr 19, 2024
Copy link

vercel bot commented Apr 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 19, 2024 8:59pm
langchainjs-docs ❌ Failed (Inspect) Apr 19, 2024 8:59pm

@dosubot dosubot bot added auto:documentation Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features labels Apr 19, 2024
@@ -0,0 +1,92 @@
import { OpenAIEmbeddings } from "@langchain/openai";
Copy link

Choose a reason for hiding this comment

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

Great work on the PR! I've flagged this change for maintainers to review as it explicitly accesses environment variables using process.env. This is an important security consideration, so it's good to have a thorough review of this code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just example code, not an actual application

@@ -76,6 +76,7 @@
"@jest/globals": "^29.5.0",
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that this PR adds a new hard dependency, "@neondatabase/serverless", to the project. I've flagged this for your review to ensure it aligns with our project's dependencies. Keep up the great work!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added only as a dev dependency

@@ -0,0 +1,357 @@
import { neon } from "@neondatabase/serverless";
Copy link

Choose a reason for hiding this comment

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

Great work on the PR! I've flagged a specific change for the maintainers to review, as it involves accessing an environment variable using the getEnvironmentVariable function. Keep up the good work!

@jacoblee93
Copy link
Collaborator

This looks great! Thank you!

@jacoblee93 jacoblee93 added the lgtm PRs that are ready to be merged as-is label Apr 22, 2024
@jacoblee93 jacoblee93 merged commit ae0264a into langchain-ai:main Apr 22, 2024
15 of 16 checks passed
@jacoblee93 jacoblee93 changed the title add neon postgres as a vector store community[minor]: add neon postgres as a vector store Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:documentation Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features lgtm PRs that are ready to be merged as-is size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants