Fix SelfQueryRetriever, passing new query to vector store (#4774)

# Fix SelfQueryRetriever, passing new query to vector store
This commit is contained in:
Yeong0228 2023-05-17 06:46:22 +08:00 committed by GitHub
parent 8fd4d5d117
commit 08876ad066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,7 @@ class SelfQueryRetriever(BaseRetriever, BaseModel):
new_kwargs["k"] = structured_query.limit new_kwargs["k"] = structured_query.limit
search_kwargs = {**self.search_kwargs, **new_kwargs} 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 return docs
async def aget_relevant_documents(self, query: str) -> List[Document]: async def aget_relevant_documents(self, query: str) -> List[Document]: