langchain.document_loaders.onedrive_file.OneDriveFileLoader¶
- class langchain.document_loaders.onedrive_file.OneDriveFileLoader(*, file: File)[source]¶
Bases:
BaseLoader,BaseModelLoads a file from 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 file: File [Required]¶
The file to load.
- 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.
- model Config[source]¶
Bases:
object- arbitrary_types_allowed = True¶
Allow arbitrary types. This is needed for the File type. Default is True. See https://pydantic-docs.helpmanual.io/usage/types/#arbitrary-types-allowed