mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-17 00:17:47 +00:00
parent
29bfbc0ea6
commit
367566b02f
@ -152,7 +152,6 @@
|
|||||||
" ) -> AsyncIterator[Document]: # <-- Does not take any arguments\n",
|
" ) -> AsyncIterator[Document]: # <-- Does not take any arguments\n",
|
||||||
" \"\"\"An async lazy loader that reads a file line by line.\"\"\"\n",
|
" \"\"\"An async lazy loader that reads a file line by line.\"\"\"\n",
|
||||||
" # Requires aiofiles\n",
|
" # Requires aiofiles\n",
|
||||||
" # Install with `pip install aiofiles`\n",
|
|
||||||
" # https://github.com/Tinche/aiofiles\n",
|
" # https://github.com/Tinche/aiofiles\n",
|
||||||
" import aiofiles\n",
|
" import aiofiles\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -723,109 +722,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "markdown",
|
||||||
"execution_count": 23,
|
"id": "d3f84501-b0aa-4a60-aad2-5109cbd37d4f",
|
||||||
"id": "6139b546b8c4d524",
|
"metadata": {},
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
|
"```python\n",
|
||||||
"from cloudpathlib import S3Client, S3Path\n",
|
"from cloudpathlib import S3Client, S3Path\n",
|
||||||
"from langchain_community.document_loaders.blob_loaders import CloudBlobLoader\n",
|
"from langchain_community.document_loaders.blob_loaders import CloudBlobLoader\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -839,7 +740,8 @@
|
|||||||
"cloud_loader = CloudBlobLoader(path, glob=\"**/*.pdf\", show_progress=True)\n",
|
"cloud_loader = CloudBlobLoader(path, glob=\"**/*.pdf\", show_progress=True)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"for blob in cloud_loader.yield_blobs():\n",
|
"for blob in cloud_loader.yield_blobs():\n",
|
||||||
" print(blob)"
|
" print(blob)\n",
|
||||||
|
"```"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1016,7 +918,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.10.1"
|
"version": "3.10.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
Loading…
Reference in New Issue
Block a user