Skip to content

The agent engineering platform.

docs: Document update for load_extended_matadata in GoogleDriveLoader (#20950)

Rahul Triptahia64a1943fdf6
diff --git a/docs/docs/integrations/document_loaders/google_drive.ipynb b/docs/docs/integrations/document_loaders/google_drive.ipynb
index fd793d368f..2e5dcba8b1 100644
--- a/docs/docs/integrations/document_loaders/google_drive.ipynb
+++ b/docs/docs/integrations/document_loaders/google_drive.ipynb
@@ -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",