Skip to content

The agent engineering platform.

docs: fix notebook (#31233)

ccurme367566b02faa
diff --git a/docs/docs/how_to/document_loader_custom.ipynb b/docs/docs/how_to/document_loader_custom.ipynb
index 2eecb72bfd..9fb0aec559 100644
--- a/docs/docs/how_to/document_loader_custom.ipynb
+++ b/docs/docs/how_to/document_loader_custom.ipynb
@@ -152,7 +152,6 @@
" ) -> AsyncIterator[Document]: # <-- Does not take any arguments\n",
" \"\"\"An async lazy loader that reads a file line by line.\"\"\"\n",
" # Requires aiofiles\n",
- " # Install with `pip install aiofiles`\n",
" # https://github.com/Tinche/aiofiles\n",
" import aiofiles\n",
"\n",
@@ -723,109 +722,11 @@
]
},
{
- "cell_type": "code",
- "execution_count": 23,
- "id": "6139b546b8c4d524",
- "metadata": {
- "ExecuteTime": {
- "end_time": "2025-04-21T08:50:15.514959Z",
- "start_time": "2025-04-21T08:50:01.219848Z"
- }
- },
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " 17%|█▋ | 1/6 [00:04<00:20, 4.20s/it]"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "metadata={} mimetype='application/pdf' path='s3://bucket-01/Annual-Report-2016.pdf'\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " 33%|███▎ | 2/6 [00:05<00:09, 2.28s/it]"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "metadata={} mimetype='application/pdf' path='s3://bucket-01/ComingHomeToNature_ActivityBooklet.pdf'\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " 50%|█████ | 3/6 [00:06<00:06, 2.01s/it]"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "metadata={} mimetype='application/pdf' path='s3://bucket-01/ComingHomeToNature_ActivityBookletFoyles.pdf'\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " 67%|██████▋ | 4/6 [00:07<00:02, 1.44s/it]"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "metadata={} mimetype='application/pdf' path='s3://bucket-01/EVENTS E-POSTER_DAYS OF AWE.pdf'\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " 83%|████████▎ | 5/6 [00:07<00:01, 1.11s/it]"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "metadata={} mimetype='application/pdf' path='s3://bucket-01/MH.pdf'\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "100%|██████████| 6/6 [00:08<00:00, 1.02s/it]"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "metadata={} mimetype='application/pdf' path='s3://bucket-01/SRT Annual Report 2018.pdf'\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "100%|██████████| 6/6 [00:11<00:00, 1.87s/it]\n"
- ]
- }
- ],
+ "cell_type": "markdown",
+ "id": "d3f84501-b0aa-4a60-aad2-5109cbd37d4f",
+ "metadata": {},
"source": [
+ "```python\n",
"from cloudpathlib import S3Client, S3Path\n",
"from langchain_community.document_loaders.blob_loaders import CloudBlobLoader\n",
"\n",
@@ -839,7 +740,8 @@
"cloud_loader = CloudBlobLoader(path, glob=\"**/*.pdf\", show_progress=True)\n",
"\n",
"for blob in cloud_loader.yield_blobs():\n",
- " print(blob)"
+ " print(blob)\n",
+ "```"
]
},
{
@@ -1016,7 +918,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.1"
+ "version": "3.10.4"
}
},
"nbformat": 4,