Skip to content

The agent engineering platform.

docs: fix missing 'self' reference in for-loop over documents (#31332)

DayDang5bf539f4053d
diff --git a/docs/docs/how_to/custom_retriever.ipynb b/docs/docs/how_to/custom_retriever.ipynb
index 31b6fb90a1..85571a8bb4 100644
--- a/docs/docs/how_to/custom_retriever.ipynb
+++ b/docs/docs/how_to/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",