langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
92.22k stars 14.72k forks source link

ChromaDB 0.4+ is no longer compatible with client config #7887

Closed gpapp closed 6 months ago

gpapp commented 1 year ago

System Info

Who can help?

No response

Information

Related Components

Reproduction

Steps to reproduce:

  1. Create a Chroma store which is locally persisted
    store = Chroma.from_texts(
    texts=docs, embedding=embeddings, metadatas=metadatas, persist_directory=environ["DB_DIR"]
    )
  2. Get the error You are using a deprecated configuration of Chroma. Please pip install chroma-migrate and runchroma-migrateto upgrade your configuration. See https://docs.trychroma.com/migration for more information or join our discord at https://discord.gg/8g5FESbj for help!
  3. Suffer

Expected behavior

  1. Create locally persisted Chroma store
  2. Use Chroma store

The issue:

Starting chromadb 0.40 the chroma_db_impl is no longer a supported parameter, it uses sqlite instead.

Removing the line chroma_db_impl="duckdb+parquet", from langchain.vectorstores/chroma.py solves the issue, but the earlier DB cannot be used or migrated.

dosubot[bot] commented 7 months ago

Hi, @gpapp,

I'm helping the LangChain team manage their backlog and am marking this issue as stale. It seems like there has been a lot of discussion and troubleshooting around the compatibility issue with ChromaDB. Users have reported encountering errors related to deprecated configurations and attribute issues when using the latest versions of ChromaDB and LangChain. Some users have found success by downgrading to an older version of ChromaDB, while others have shared their settings and code snippets that have worked for them. The LangChain team has also provided guidance and suggestions for resolving the issue, including checking the versions of the libraries being used and ensuring proper configuration settings. The issue appears to be ongoing, with users continuing to seek assistance and share their experiences with different approaches.

Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you!