Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
π
π
π
Powered by
Hall
Active
Updated 3 weeks ago
0
Follow
Bm25
Bm25
Active
0
Follow
T
Tush
3 weeks ago
Β·
I keep getting error for this :
bm25_retriever = BM25Retriever.from_defaults(nodes=text_nodes, similarity_top_k=2)
error:
~llama_index/retrievers/bm25/base.py", line 119, in from_defaults
raise ValueError("Please pass exactly one of index, nodes, or docstore.")
ValueError: Please pass exactly one of index, nodes, or docstore.
Even tho I am passing the textnodes
L
T
3 comments
Share
Open in Discord
L
Logan M
3 weeks ago
I'd have to check the source code, but I'm pretty sure you can pass the nodes to the constructor directly
L
Logan M
edited 3 weeks ago
Looking at the source code, either should work
https://github.com/run-llama/llama_index/blob/e9c69ce9b7cef599e997b3d9117e98ef87aac4c5/llama-index-integrations/retrievers/llama-index-retrievers-bm25/llama_index/retrievers/bm25/base.py#L35
T
Tush
3 weeks ago
Thank you ! I was able to get it working !
Add a reply
Sign up and join the conversation on Discord
Join on Discord