You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The vectorstore based on Pinecone will fail due to cannot set attribute error
To Reproduce
Steps to reproduce the behavior:
Add Pinecone related keys to the .env file
Run pytest in the src folder
Multiple tests will fail due to the following error
def __init__(self, namespace, db, embeddings, text_key):
self.db = db
self.namespace = namespace
> self.embeddings = embeddings
E AttributeError: can't set attribute
sherpa_ai\connectors\vectorstores.py:24: AttributeError
Expected behavior
These tests should pass
Screenshots
Additional context
After a bit dig in, I found that LangChain updated their VectorStore API and now embedding is a property function as following
@propertydefembeddings(self) ->Optional[Embeddings]:
"""Access the query embedding object if available."""logger.debug(
f"{Embeddings.__name__} is not implemented for {self.__class__.__name__}"
)
returnNone
So we need to change our inheritance accordingly, maybe by overriding this function.
The text was updated successfully, but these errors were encountered:
Describe the bug
The
vectorstore
based on Pinecone will fail due tocannot set attribute
errorTo Reproduce
Steps to reproduce the behavior:
.env
filepytest
in thesrc
folderExpected behavior
These tests should pass
Screenshots
Additional context
After a bit dig in, I found that
LangChain
updated theirVectorStore
API and now embedding is a property function as followingSo we need to change our inheritance accordingly, maybe by overriding this function.
The text was updated successfully, but these errors were encountered: