The example code provided by the official website runs with an error
🐛 Describe the bug
`import os from mem0 import Memory from langchain_community.vectorstores import Chroma from langchain_openai import OpenAIEmbeddings
Initialize a LangChain vector store
embeddings = OpenAIEmbeddings() vector_store = Chroma( persist_directory="./chroma_db", embedding_function=embeddings, collection_name="mem0" # Required collection name )
Pass the initialized vector store to the config
config = { "vector_store": { "provider": "langchain", "config": { "client": vector_store } } }
m = Memory.from_config(config) messages = [ {"role": "user", "content": "I'm planning to watch a movie tonight. Any recommendations?"}, {"role": "assistant", "content": "How about thriller movies? They can be quite engaging."}, {"role": "user", "content": "I'm not a big fan of thriller movies but I love sci-fi movies."}, {"role": "assistant", "content": "Got it! I'll avoid thriller recommendations and suggest sci-fi movies in the future."} ] m.add(messages, user_id="alice", metadata={"category": "movies"})`
https://docs.mem0.ai/components/vectordbs/dbs/langchain
The above is the example code provided by the official website, but there is an error when running it. The error is as follows
C:\Users\Administrator\ghtencent\mem0\testzz2.py:9: LangChainDeprecationWarning: The class Chroma was deprecated in LangChain 0.2.9 and will be removed in 1.0. An updated version of the class exists in the :class:~langchain-chroma package and should be used instead. To use it run pip install -U :class:~langchain-chroma and import as from :class:~langchain_chroma import Chroma``.
vector_store = Chroma(
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2024.3.3\plugins\python-ce\helpers\pydev\pydevd.py", line 1570, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2024.3.3\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:\Users\Administrator\ghtencent\mem0\testzz2.py", line 25, in