Closed k8scat closed 2 weeks ago
The issue you're encountering is due to the response_synthesizer
parameter being passed to the VectorStoreQuery
constructor, which does not accept this parameter. The VectorStoreQuery
class has a specific set of allowed parameters, and response_synthesizer
is not one of them. The allowed parameters for VectorStoreQuery
include query_embedding
, similarity_top_k
, doc_ids
, node_ids
, query_str
, output_fields
, embedding_field
, mode
, alpha
, filters
, mmr_threshold
, sparse_top_k
, and hybrid_top_k
[1].
To resolve this issue, you need to ensure that only the parameters accepted by VectorStoreQuery
are passed to it. You might need to filter out any unsupported parameters like response_synthesizer
before they are passed to the VectorContextRetriever
or VectorStoreQuery
. This can be done by modifying the code where **kwargs
are being passed to ensure only valid parameters are included.
To continue talking to Dosu, mention @dosu.
Bug Description
I want to use PropertyGraphIndex, and there is Vector Index inside, but when I pass the
response_synthesizer
ornode_postprocessors
, it failedAnd I found the bug is from
PropertyGraphIndex.as_retriever
:while embed is enabled, the
VectorContextRetriever
will be appended tosub_retrievers
, andVectorContextRetriever._retriever_kwargs
will be set tokwargs
, finally, theVectorStoreQuery
will use theVectorContextRetriever._retriever_kwargs
to init itself:But there will be a problem, some params are not allowed while construct
VectorStoreQuery
:Version
0.11.18
Steps to Reproduce
Relevant Logs/Tracbacks