LangChain
Mem0 supports LangChain as a provider for vector store integration. LangChain provides a unified interface to various vector databases, making it easy to integrate different vector store providers through a consistent API.
When using LangChain as your vector store provider, you must set the collection name to “mem0”. This is a required configuration for proper integration with Mem0.
Usage
Supported LangChain Vector Stores
LangChain supports a wide range of vector store providers, including:
- Chroma
- FAISS
- Pinecone
- Weaviate
- Milvus
- Qdrant
- And many more
You can use any of these vector store instances directly in your configuration. For a complete and up-to-date list of available providers, refer to the LangChain Vector Stores documentation.
Limitations
When using LangChain as a vector store provider, there are some limitations to be aware of:
-
Bulk Operations: The
get_all
anddelete_all
operations are not supported when using LangChain as the vector store provider. This is because LangChain’s vector store interface doesn’t provide standardized methods for these bulk operations across all providers. -
Provider-Specific Features: Some advanced features may not be available depending on the specific vector store implementation you’re using through LangChain.
Provider-Specific Configuration
When using LangChain as a vector store provider, you’ll need to:
- Set the appropriate environment variables for your chosen vector store provider
- Import and initialize the specific vector store class you want to use
- Pass the initialized vector store instance to the config
Make sure to install the necessary LangChain packages and any provider-specific dependencies.
Config
All available parameters for the langchain
vector store config are present in Master List of All Params in Config.