langchain.document_loaders.dropbox.DropboxLoader¶

class langchain.document_loaders.dropbox.DropboxLoader(*, dropbox_access_token: str, dropbox_folder_path: Optional[str] = None, dropbox_file_paths: Optional[List[str]] = None, recursive: bool = False)[source]¶

Bases: BaseLoader, BaseModel

Loads files from Dropbox.

In addition to common files such as text and PDF files, it also supports Dropbox Paper files.

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 dropbox_access_token: str [Required]¶

Dropbox access token.

param dropbox_file_paths: Optional[List[str]] = None¶

The file paths to load from.

param dropbox_folder_path: Optional[str] = None¶

The folder path to load from.

param recursive: bool = False¶

Flag to indicate whether to load files recursively from subfolders.

lazy_load() Iterator[Document]¶

A lazy loader for Documents.

load() List[Document][source]¶

Load documents.

load_and_split(text_splitter: Optional[TextSplitter] = None) List[Document]¶

Load Documents and split into chunks. Chunks are returned as Documents.

Parameters

text_splitter – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.

Returns

List of Documents.

validator validate_inputs  »  all fields[source]¶

Validate that either folder_path or file_paths is set, but not both.

Examples using DropboxLoader¶