Find answers from the community

Updated 10 months ago

Hello, I stayed a long time to llama-

Hello, I stayed a long time to llama-index 9.X.X and when I upgraded to 10.X.X, I have this error :

....
ValidationError: 1 validation error for NodeWithScore node Can't instantiate abstract class BaseNode with abstract methods get_content, get_metadata_str, get_type, hash, set_content (type=type_error

with this code :
...
serviceContext = ServiceContext.from_defaults(text_splitter=splitter,embed_model=embedModel)
vector_store = PineconeVectorStore(pc.Index(data.index),namespace=data.name)
index = VectorStoreIndex.from_vector_store(vector_store=vector_store,service_context=serviceContext)

retriever = index.as_retriever(similarity_top_k=int(data.nbrTop),filters=filters)
retriever.retrieve("test") #HERE
print(data)
b
W
L
3 comments
Does your VectorStoreIndex have some nodes defined?
I think this error usually comes from mixing legacy imports with non-legacy imports -- either all imports should be using legacy, or none at all
Add a reply
Sign up and join the conversation on Discord