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], azure-cosmosdb[major]: add new integration for Azure CosmosDB for NoSQL #6133

Merged
merged 62 commits into from
Aug 7, 2024

Conversation

sinedied
Copy link
Contributor

@sinedied sinedied commented Jul 18, 2024

Changes

@langchain/community

  • chore: deprecate Azure CosmosDB for MongoDB vCore vector store in favor of the new package integration

@langchain/azure-cosmosdb

  • feat: new package
  • feat: add updated Azure CosmosDB for MongoDB vCore integration (new name: AzureCosmosDBMongoDBvCoreVectorStore instead of AzureCosmosDBVectorStore
  • feat: add new Azure CosmosDB for NoSQL integration

docs

  • docs: updated docs and examples to use the new @langchain/azure-cosmosdb package

@sinedied
Copy link
Contributor Author

sinedied commented Aug 6, 2024

@jacoblee93 I've updated the PR and answered all your comments, let me know if it's good for you?

this.indexOptions = dbConfig.indexOptions ?? {};

// Deferring initialization to the first call to `initialize`
this.initialize = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would prefer this as a static method like this:

https://v02.api.js.langchain.com/classes/langchain_community_vectorstores_pgvector.PGVectorStore.html#initialize

Since I'm not sure this will show up well in API refs, but won't block on it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you be ok with a middle ground approach?

  • make the current initialize method I made internal
  • add a new static initialize method the calls constructor + init/connect the db connection
  • keep the "automatic" init when calling any VS method in case it wasn't done before (for compatibility / simplicity)
  • explain how the init works in the docs

My reasoning: I'd like to make the migration from the previous implementation painless (ie keep the auto init) and also make it work for folks who skim quickly through docs and just call the constructor without using the initialize method

@jacoblee93
Copy link
Collaborator

jacoblee93 commented Aug 7, 2024

Thanks! It's failing lint + format but I can have a look.

Just FYI - we're also doing a bunch of work right now to standardize our integration docs/make our API refs more usable and maintainable:

https://js.langchain.com/v0.2/docs/integrations/vectorstores/pinecone

@jacoblee93
Copy link
Collaborator

Thank you!

@jacoblee93
Copy link
Collaborator

Live here: https://www.npmjs.com/package/@langchain/azure-cosmosdb

@sinedied
Copy link
Contributor Author

sinedied commented Aug 8, 2024

Thanks! It's failing lint + format but I can have a look.

Just FYI - we're also doing a bunch of work right now to standardize our integration docs/make our API refs more usable and maintainable:

https://js.langchain.com/v0.2/docs/integrations/vectorstores/pinecone

Thanks! I'll look into updating the docs to the new format in the next PR!

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 size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants