template="gdrive-mime-type",    mime_type="application/vnd.google-apps.spreadsheet", # Only GSheet files    gsheet_mode="elements",    num_results=2,  # Maximum number of file to load)for doc in loader.load():    print("---")    print(doc.page_content.strip()[:60]+"...")Advanced usage‚ÄãAll Google File have a 'description' in the metadata. This field can be used to memorize a summary of the document or others indexed tags (See method lazy_update_description_with_summary()).If you use the mode="snippet", only the description will be used for the body. Else, the metadata['summary'] has the field.Sometime, a specific filter can be used to extract some information from the filename, to select some files with specific criteria. You can use a filter.Sometimes, many documents are returned. It's not necessary to have all documents in memory at the same time. You can use the lazy versions of methods, to get one document at a time. It's better to use a complex query in place of a recursive search. For each folder, a query must be applied if you activate recursive=True.import osloader = GoogleDriveLoader(                gdrive_api_file=os.environ["GOOGLE_ACCOUNT_FILE"],                num_results=2,                template="gdrive-query",                filter=lambda search, file: "#test" not in file.get('description',''),                query='machine learning',                supportsAllDrives=False,                )for doc in loader.load():    print("---")    print(doc.page_content.strip()[:60]+"...")PreviousGoogle Cloud Storage FileNextGrobidPrerequisitesüßë Instructions for ingesting your Google Docs dataPassing in Optional File LoadersExtended usageCustomize the search patternAdvanced usageCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
Google Drive is a file storage and synchronization service developed by Google.
Google Drive is a file storage and synchronization service developed by Google. ->: template="gdrive-mime-type",    mime_type="application/vnd.google-apps.spreadsheet", # Only GSheet files    gsheet_mode="elements",    num_results=2,  # Maximum number of file to load)for doc in loader.load():    print("---")    print(doc.page_content.strip()[:60]+"...")Advanced usage‚ÄãAll Google File have a 'description' in the metadata. This field can be used to memorize a summary of the document or others indexed tags (See method lazy_update_description_with_summary()).If you use the mode="snippet", only the description will be used for the body. Else, the metadata['summary'] has the field.Sometime, a specific filter can be used to extract some information from the filename, to select some files with specific criteria. You can use a filter.Sometimes, many documents are returned. It's not necessary to have all documents in memory at the same time. You can use the lazy versions of methods, to get one document at a time. It's better to use a complex query in place of a recursive search. For each folder, a query must be applied if you activate recursive=True.import osloader = GoogleDriveLoader(                gdrive_api_file=os.environ["GOOGLE_ACCOUNT_FILE"],                num_results=2,                template="gdrive-query",                filter=lambda search, file: "#test" not in file.get('description',''),                query='machine learning',                supportsAllDrives=False,                )for doc in loader.load():    print("---")    print(doc.page_content.strip()[:60]+"...")PreviousGoogle Cloud Storage FileNextGrobidPrerequisitesüßë Instructions for ingesting your Google Docs dataPassing in Optional File LoadersExtended usageCustomize the search patternAdvanced usageCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.