In the latest package release 1.x, we can not find the MemoryVectorStore
In our project, we are using it like this for searching through embedded documents
import { MemoryVectorStore, MemoryVectorStoreArgs } from ‘langchain/vectorstores/memory’;
but in the new version, we can’t find the MemoryVectorStore, and nothing is mentioned about it in the migration guide https://docs.langchain.com/oss/javascript/migrate/langchain-v1#removal-of-deprecated-apis
Could you please explain how we should migrate it?
Thanks.
Hi @kholiavko-roman
install @langchain/classic
and then
import { MemoryVectorStore, MemoryVectorStoreArgs } from "@langchain/classic/vectorstores/memory";
Yeah, I found it in the classic repository, but it the repo docs it stands that it is outdated repository. langchainjs/libs/langchain-classic at main · langchain-ai/langchainjs · GitHub
This package is in maintenance mode. For new features and active development, use langchain v1.0.
I am wondering if it will be migrated to the package langchain v1.x? Because we don’t use the outdated package in our project.
It is for backward compatibility.
This package contains functionality from LangChain v0.x that has been moved out of the main langchain package as part of the v1.0 release. It exists to provide backward compatibility for existing applications while the core langchain package focuses on the essential building blocks for modern agent development.
Offical docs mention the imports as well Vector stores - Docs by LangChain
There are no other options to import MemoryVectorStore from for now.
@langchain/classic is still a valid lib for production use. It might change in future.
I agree, that the explanation under the link you shared might be confusing.
1 Like
Thank you for explanation.
yes, definitely it is so confusing with all new separation changes.
1 Like