langchain-ai / langchain

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

Chromadb error #18098

Closed varayush007 closed 6 months ago

varayush007 commented 7 months ago
          I am getting this error while using 

embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2') to_vectorize = [" ".join(example.values()) for example in few_shots]

vectorstore = Chroma.from_texts( to_vectorize, embedding=embeddings, metadatas=few_shots )

ValueError: Expected EmbeddingFunction.call to have the following signature: odict_keys(['self', 'input']), got odict_keys(['self', '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

Im using chromadb==0.4.15

Originally posted by @varayush007 in https://github.com/langchain-ai/langchain/issues/13051#issuecomment-1963036031

ABIRAMI1997 commented 4 months ago

@varayush007 how did you fixed it?

varayush007 commented 4 months ago

@ABIRAMI1997 langchain==0.0.284 python-dotenv==1.0.0 streamlit==1.22.0 tiktoken==0.4.0 faiss-cpu==1.7.4 protobuf~=3.19.0 langchain_experimental mysql-connector-python pymysql sentence-transformers==2.2.2 chromadb transformers==4.31.0

I used these requirements and it works for me.

ABIRAMI1997 commented 4 months ago

Got it .. Thank you :)

deamonvector commented 4 months ago

im still facing this issue