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 support for Couchbase Vector Store #4737

Merged
merged 7 commits into from
Mar 15, 2024

Conversation

lokesh-couchbase
Copy link
Contributor

Add support for Vector Store in Couchbase, a distributed NoSQL database.

  • Includes Full Tech Search Based Vector Search
  • Bump couchbase version in langchain for document loader

Dependencies:
Added the Couchbase SDK as an optional dependency to langchain community.

* added couchbase document loader

* fixed loader to use stringify

* add doc file

* updated tests

* update types as per new requirement

* update comments for typedoc

* fix formatting issues and remove print in tests

* add support for couchbase vector search using sdk

* improved the params of couchbase

* bump couchbase sdk version

* remove rest implementation

* add tsdoc

* use initialize to create instance of class

* improved tsdocs

* add tests

* add similarity search in documentation

* add hybrid search in documentation and tests

* remove unwanted files
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Mar 13, 2024
Copy link

vercel bot commented Mar 13, 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 Mar 15, 2024 9:58pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview Mar 15, 2024 9:58pm

@lokesh-couchbase lokesh-couchbase marked this pull request as draft March 13, 2024 15:46
@dosubot dosubot bot added the auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features label Mar 13, 2024
@@ -0,0 +1,60 @@
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.

Hey there! I've reviewed the code and flagged the addition of environment variable usage for the maintainers to review. It's important to ensure that sensitive information is handled securely. Let me know if you need further assistance with this.

@@ -122,6 +122,7 @@
"closevector-web": "0.1.6",
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 a new dependency "couchbase" with version "^4.2.11" has been added to the project. This change is being flagged for your review to ensure it aligns with the project's dependency requirements. Thank you!

@@ -0,0 +1,240 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
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 includes changes that access environment variables using process.env. I've flagged this for your review to ensure that the handling of environment variables aligns with best practices. Let me know if you need any further assistance with this!

@lokesh-couchbase lokesh-couchbase marked this pull request as ready for review March 14, 2024 10:15
@@ -0,0 +1,60 @@
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.

Hey there! I've reviewed the code and flagged the addition of environment variable usage for the maintainers to review. It's important to ensure that sensitive information is handled securely. Let me know if you need further assistance with this.

@@ -122,6 +122,7 @@
"closevector-web": "0.1.6",
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 a new dependency "couchbase" with version "^4.2.11" has been added to the project. This change is being flagged for your review to ensure it aligns with the project's dependency requirements. Thank you!

@@ -0,0 +1,240 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
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 includes changes that access environment variables using process.env. I've flagged this for your review to ensure that the handling of environment variables aligns with best practices. Let me know if you need any further assistance with this!

@jacoblee93
Copy link
Collaborator

Is this still draft?

@lokesh-couchbase lokesh-couchbase marked this pull request as ready for review March 15, 2024 03:53
@@ -64,6 +64,7 @@
"axios": "^0.26.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 the recent change in the package.json file added the "couchbase" dependency as a hard dependency. I'm flagging this for your review. Keep up the great work!

@@ -0,0 +1,66 @@
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.

Hey there! I've reviewed the code changes in the PR and flagged it for your review. The added code explicitly requires environment variables via process.env, so it's important to ensure that the necessary environment variables are properly set and handled. Let me know if you need any further assistance with this!

@@ -122,6 +122,7 @@
"closevector-web": "0.1.6",
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 a new dependency "couchbase" with version "^4.3.0" has been added to the project. This change is flagged for your review to ensure it aligns with the project's dependency requirements. Keep up the great work!

@@ -0,0 +1,240 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
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 includes changes that access environment variables using process.env. I've flagged this for your review to ensure that the handling of environment variables aligns with best practices. Let me know if you need any further assistance with this!

@lokesh-couchbase
Copy link
Contributor Author

Is this still draft?

Yes, it was draft due to a new Couchbase SDK Release as I had to test that out. It's done and ready for review now

@jacoblee93
Copy link
Collaborator

Looks good! Small nit if you can change the env var names but otherwise looks good.

@jacoblee93 jacoblee93 added the close PRs that need one or two touch-ups to be ready label Mar 15, 2024
@jacoblee93 jacoblee93 self-assigned this Mar 15, 2024
@jacoblee93 jacoblee93 changed the title Add support for Couchbase Vector Store community[minor]: Add support for Couchbase Vector Store Mar 15, 2024
@jacoblee93
Copy link
Collaborator

Changed it myself, thank you!

@jacoblee93 jacoblee93 added lgtm PRs that are ready to be merged as-is and removed close PRs that need one or two touch-ups to be ready labels Mar 15, 2024
@jacoblee93 jacoblee93 merged commit 3c63344 into langchain-ai:main Mar 15, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants