Find answers from the community

Updated 7 months ago

Anyone getting this error while using

Anyone getting this error while using BM25 Retriever?
Plain Text
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)
W
k
L
18 comments
Are you trying with latest version fro BM25 and llamaindex?
only encountered after upgrading llamaindex version
Can you try upgrading BM25 as well?
Seems like you are mixing legacy imports with non-legacy imports
I checked that too
Plain Text
import streamlit as st
from llama_index.llms.openai import OpenAI
from llama_index.retrievers.bm25 import BM25Retriever
from llama_index.core.retrievers import VectorIndexRetriever
from llama_index.core.retrievers import BaseRetriever
from llama_index.core.chat_engine import CondensePlusContextChatEngine
from llama_index.core.query_engine import RetrieverQueryEngine
from llama_index.core.postprocessor import LongContextReorder 
from llama_index.core.base.llms.types import ChatMessage, MessageRole
from llama_index.embeddings.openai import OpenAIEmbedding
import openai
import os
these are my imports
One detail I missed. I am running this on ec2
Hmm I've never had that issue. Maybe start with a fresh venv?
Not working even with a fresh venv?
I even tried deploying streamlit community cloud
Doesn't work there too
Works fine for me in a fresh env. Also runs fine on Google colab
If you can reproduce on Google colab, then it's my problem πŸ˜… seems like an issue with either your env, deps, or imports
Okay. Thanks for the help!
Add a reply
Sign up and join the conversation on Discord