I have been trying to use
Chromadb version 0.4.8Langchain version 0.0.276with SentenceTransformerEmbeddingFunction as shown in the snippet below.
from langchain.vectorstores import Chroma
from chromadb.utils import embedding_functions
# other imports
embedding = embedding_functions.SentenceTransformerEmbeddingFunction(model_name="all-MiniLM-L6-v2")
However, it throws the following error.
AttributeError: 'SentenceTransformerEmbeddingFunction' object has no attribute 'embed_documents'
Would appreciate any help. Thank you.
Your error irrelevant with code that you provided. I am on same versions with you but this works for me, maybe your usage of embedding variable can cause this error.

Can you please provide full code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With