mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-04 14:13:29 +00:00
docs: Document update for load_extended_matadata in GoogleDriveLoader (#20950)
Document: Updated google_drive,ipynb for loading following extended metadata. - full_path - Full path of the file/s in google drive. - owner - owner of the file/s. - size - size of the file/s. Code changes: [langchain-google/pull/179.](https://github.com/langchain-ai/langchain-google/pull/179) Signed-off-by: Rahul Tripathi <rauhl.psit.ec@gmail.com> Co-authored-by: Rahul Tripathi <rauhl.psit.ec@gmail.com> Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
This commit is contained in:
parent
4f4ee8e2cf
commit
a64a1943fd
@ -368,6 +368,54 @@
|
||||
"doc[0].metadata"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5ae0a525",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Loading extended metadata\n",
|
||||
"Following extra fields can also be fetched within metadata of each Document:\n",
|
||||
" - full_path - Full path of the file/s in google drive.\n",
|
||||
" - owner - owner of the file/s.\n",
|
||||
" - size - size of the file/s."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "6c0db38c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_google_community import GoogleDriveLoader\n",
|
||||
"\n",
|
||||
"loader = GoogleDriveLoader(\n",
|
||||
" folder_id=folder_id,\n",
|
||||
" load_extended_matadata=True,\n",
|
||||
" # Optional: configure whether to load extended metadata for each Document.\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"doc = loader.load()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "826d88a7",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"You can pass load_extended_matadata=True, to add Google Drive document extended details to metadata."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "fdaf04e4",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"doc[0].metadata"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "cd13d7d1-db7a-498d-ac98-76ccd9ad9019",
|
||||
|
Loading…
Reference in New Issue
Block a user