From 777a57240fe341f03a966490f4d02c74240d958e Mon Sep 17 00:00:00 2001 From: Chen94yue <34304578+Chen94yue@users.noreply.github.com> Date: Tue, 23 Apr 2024 15:27:00 +0800 Subject: [PATCH] Update custom_retriever.ipynb Fixed an error in the sample code to ensure that the code can run directly. --- .../modules/data_connection/retrievers/custom_retriever.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/modules/data_connection/retrievers/custom_retriever.ipynb b/docs/docs/modules/data_connection/retrievers/custom_retriever.ipynb index 1bab3e68f2d9a..ddb81fc0e483a 100644 --- a/docs/docs/modules/data_connection/retrievers/custom_retriever.ipynb +++ b/docs/docs/modules/data_connection/retrievers/custom_retriever.ipynb @@ -98,7 +98,7 @@ " ) -> List[Document]:\n", " \"\"\"Sync implementations for retriever.\"\"\"\n", " matching_documents = []\n", - " for document in documents:\n", + " for document in self.documents:\n", " if len(matching_documents) > self.k:\n", " return matching_documents\n", "\n",