Find answers from the community

Updated 3 months ago

Hey there, new to the community.

Hey there, new to the community.
A while ago, I was building a similarity search module and then using llama_index RetrieverQueryEngine.
I was initially using v0.6.20 so I was building the response_synthesizer like this:

Plain Text
response_synthesizer = ResponseSynthesizer.from_args(
            node_postprocessors=[
                SimilarityPostprocessor(
                    similarity_cutoff=config_params["retrieval"]["similarity_cutoff"]
                )
            ]
        )

However, when I imported Node:
Plain Text
from llama_index.data_structs import Node
, I started getting the error
Plain Text
ImportError: cannot import name 'BaseCache' from 'langchain'
.
I updated the llama_index version to 0.8.64.post1 but I think ResponseSynthesizer was updated.
I can't seem to find how to use node_postprocessors with the get_response_synthesizer. I may be missing something basic, any suggestions?
Thanks
L
i
3 comments
get_response_synthesizer no longer uses node postprocessors, instead that got moved up a level into the query engine itself

This section will be helpful for you
https://docs.llamaindex.ai/en/stable/understanding/querying/querying.html#customizing-the-stages-of-querying
v0.6.20 is quite old btw πŸ˜… I'd expect some growing pains, but happy to help you migrate
Thank you πŸ₯Ή
I'll add all my dumb questions on this thread. Thanks Logan πŸ™‚
Add a reply
Sign up and join the conversation on Discord