Closed pve closed 4 months ago
This should demonstrate it:
#https://docs.google.com/document/d/1kZr95WfvPSckVFh_HJ32AbuWy0eSt2YvkZcM6NntD7k/edit?usp=sharing
from langchain_googledrive.document_loaders import GoogleDriveLoader
doc_id='1kZr95WfvPSckVFh_HJ32AbuWy0eSt2YvkZcM6NntD7k'
folder_id='1VLBA1kJtaaP507-jrIjKnEmggn6Hy1tH'
loader = GoogleDriveLoader(
folder_id=folder_id,
recursive=False,
num_results=2, # Maximum number of file to load
file_type=["application/vnd.google-apps.document"],
includeItemsFromAllDrives=True
)
docs = loader.load()
print(docs[0].page_content)
Hello,
The version v0.2.5 proposes a new parameter: suggestionsViewMode
.
You can set suggestionsViewMode="PREVIEW_SUGGESTIONS_ACCEPTED"
perfect!
Feature request
from langchain_googledrive.document_loaders import GoogleDriveLoader
working with file_type=["application/vnd.google-apps.document"]
Google Docs can have suggestions embedded.
The current drive loader exports as markdown both the old and the new version of each suggestion. In markdown, I'd like to see the newer version only (or have a choice for that matter).
Motivation
In my application I am indexing files that are being edited. I want either the original or the final version of these edits (suggestions), not a blur of both. Note that this is independent of GDrive's revisions history.
Your contribution
I can review updates to the source or documentation.