OneDriveLoader#
- class langchain_community.document_loaders.onedrive.OneDriveLoader[source]#
Bases:
O365BaseLoader
Load from Microsoft OneDrive.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param auth_with_token: bool = False#
Whether to authenticate with a token or not. Defaults to False.
- param chunk_size: int | str = 5242880#
Number of bytes to retrieve from each api call to the server. int or βautoβ.
- param drive_id: str [Required]#
The ID of the OneDrive drive to load data from.
- param folder_path: str | None = None#
The path to the folder to load data from.
- param object_ids: List[str] | None = None#
The IDs of the objects to load data from.
- param recursive: bool = False#
Should the loader recursively load subfolders?
- param settings: _O365Settings [Optional]#
Settings for the Office365 API client.
- async alazy_load() AsyncIterator[Document] #
A lazy loader for Documents.
- Return type:
AsyncIterator[Document]
- lazy_load() Iterator[Document] [source]#
Load documents lazily. Use this when working at a large scale.
- Return type:
Iterator[Document]
- load_and_split(text_splitter: TextSplitter | None = None) List[Document] #
Load Documents and split into chunks. Chunks are returned as Documents.
Do not override this method. It should be considered to be deprecated!
- Parameters:
text_splitter (Optional[TextSplitter]) β TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.
- Returns:
List of Documents.
- Return type:
List[Document]
Examples using OneDriveLoader