From 08876ad0660222fcc481175639c59ce9f2b110bb Mon Sep 17 00:00:00 2001 From: Yeong0228 <110876608+Yeong0228@users.noreply.github.com> Date: Wed, 17 May 2023 06:46:22 +0800 Subject: [PATCH] Fix SelfQueryRetriever, passing new query to vector store (#4774) # Fix SelfQueryRetriever, passing new query to vector store --- langchain/retrievers/self_query/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langchain/retrievers/self_query/base.py b/langchain/retrievers/self_query/base.py index 97eb3f05..ffe45721 100644 --- a/langchain/retrievers/self_query/base.py +++ b/langchain/retrievers/self_query/base.py @@ -81,7 +81,7 @@ class SelfQueryRetriever(BaseRetriever, BaseModel): new_kwargs["k"] = structured_query.limit search_kwargs = {**self.search_kwargs, **new_kwargs} - docs = self.vectorstore.search(query, self.search_type, **search_kwargs) + docs = self.vectorstore.search(new_query, self.search_type, **search_kwargs) return docs async def aget_relevant_documents(self, query: str) -> List[Document]: