chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Bug]: Unable to load and create vector data base by using langchain module hugging face embedding

Open srnsrn120 opened this issue 1 year ago • 2 comments

What happened?

from langchaincommunity.embeddings import HuggingFaceEmbeddings embeddings = HuggingFaceEmbeddings(modelname="BAAI/bge-large-en-v1.5") vectorstore_2 = Chroma( collection_name="full_document", embedding_function=embeddings,persist_directory="./multi_vector_retriver_new" )

ValueError: Expected EmbeddingFunction.__call to have the following signature: odict_keys(['self', 'input']), got odict_keys(['args', 'kwargs']) Please see https://docs.trychroma.com/embeddings for details of the EmbeddingFunction interface. Please note the recent change to the EmbeddingFunction interface: https://docs.trychroma.com/migration#migration-to-0416---november-7-2023

Hi team, i was able get response in morning but from 12 oclock i am getting this error , can anyone please help me

Versions

langchainhub==0.1.15 chromadb==0.4.24

Relevant log output

ValueError: Expected EmbeddingFunction.__call to have the following signature: odict_keys(['self', 'input']), got odict_keys(['args', 'kwargs'])
Please see https://docs.trychroma.com/embeddings for details of the EmbeddingFunction interface.
Please note the recent change to the EmbeddingFunction interface: https://docs.trychroma.com/migration#migration-to-0416---november-7-2023

srnsrn120 avatar Apr 01 '24 12:04 srnsrn120

This should be fixed in our next release this coming monday - we now wrap the EF langchain gives us.

This PR needs to land - https://github.com/chroma-core/chroma/pull/1880

HammadB avatar Apr 02 '24 22:04 HammadB

@srnsrn120, can you test your use case with the latest main branch and let us know if the new LC wrapper works for you?

tazarov avatar Apr 08 '24 17:04 tazarov