Chroma constructor parameter 'embedding_function' suggestion #9070
KylePancamo
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I haven't checked out other vectorstores, but within the Chroma vectorstore the member variable 'embedding_function' seems to be misleading. When reading the code, it appears that the parameter takes in a concrete Embeddings class and later uses the function if I am to understand it correctly.
langchain/libs/langchain/langchain/vectorstores/chroma.py
Line 72 in a5a4c53
langchain/libs/langchain/langchain/vectorstores/chroma.py
Line 125 in a5a4c53
langchain/libs/langchain/langchain/vectorstores/chroma.py
Line 187 in a5a4c53
From my understanding and looking at the source code you need the entire class for api specifics, yet name implies you pass a function and not an instance of a class. A suggestion is to rename the parameter to embeddings unless there's a specific reason for the name.
Beta Was this translation helpful? Give feedback.
All reactions